Template Jumping Spell Template v3

emjlr3

Change can be a good thing
Reaction score
395
its not a problem
 

emjlr3

Change can be a good thing
Reaction score
395
major, heavy duty updates, check it out!!!
 

thevoden

New Member
Reaction score
5
I tried it in my map and copied the triggers and its giving me an error when I saved it. I'm using the regular WE. Does this require newgen jass or something?
 

PureOwnage

Minecraft Server OP, Inactive.
Reaction score
72
Yes, this needs NewGen to compile this code so Warcraft can understand it.
 

Kitt

New Member
Reaction score
5
I seem to be having problems with this code. It will work the first time a jump is used, but after that, the unit casts his animation (but without jumping), and then gets frozen in the spot - unable to move or do anything. If the unit dies, it does not "reset" the error. In other words, he will freeze on every other trigger after the first one of the whole game.

The only edits I made to the code were to adapt it for triggering on attack, rather than one casting of a spell. Here is my trigger code:
JASS:
Jump Test
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Scargil (ranged)
    Actions
        Custom script:   call JST_Cast(GetAttacker(),100.,200.,100.,"attack - 1","Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")

and here is the line I changed in the jump code:
JASS:
set d = dat.create()       
    set ux = GetUnitX(u)
    set uy = GetUnitY(u)   
    set l = GetUnitLoc(GetAttackedUnitBJ())   // <--- Changed this.
    set ang = Atan2((GetLocationY(l)-uy),(GetLocationX(l)-ux))
    set x = GetLocationX(l) - diff * Cos(ang)
    set y = GetLocationY(l) - diff * Sin(ang)


Any ideas?

Edit: And now the error has magically stopped... I'm not quite sure what changed. It bothers me though - Will it crop up again? I'll look into it, and if anything new arises, I'll update.

Edit2: I seem to have figured out what the error is. The functions doesn't like to be called while it's already running. Doing so really screws things up. As far as I can tell, units are still able to take actions while they're "jumping", and so the unit was attacking while in mid flight, and activating the jump a second time. The reason it "fixed itself" for me was that I was using a condition so that the unit wouldn't jump when it was within 300 range of the attacking unit (looks a little dumb to be jumping when you're that close). In other words, the trigger wasn't activating twice because by the time he would attack again (his attack cooldown was up) he would be too close. I'm guessing this never manifested before because no one was casting the skill (or couldn't) while in flight. I've been reading over the code, to try and add a quick variable check to stop it from running more than one instance of the function at a time, but I can't quite seem to get it to work right. Perhaps someone who knows the code better has any ideas?
 

Kitt

New Member
Reaction score
5
Sorry for the double post, but I felt the two comments were different enough to warrant separate posts.

Is there some way to speed up the total travel time on the leap?

For example, if the unit is far away, the traveling works well; however if the unit is nearby, the casting unit jump slowly, dramatically, and unrealistically. Being able to speed the jump up based on how far the unit is would make things look more realistic (quicker jump for closer units.)

How would I go about doing this?
 

Kenny

Back for now.
Reaction score
202
if the unit is far away, the traveling works well; however if the unit is nearby, the casting unit jump slowly, dramatically, and unrealistically.

This just caught me eye, as it is something that has bothered me for a while, however there is no sure way of changing it (as far as i know). You could fiddle with the "Runs" and "HalfRuns" globals at the top of the script, this would change the overall speed. However it will also make it faster for a longer distance as well. So once you get the right speed up close it will be faster then wanted for further distances.

I am working on a jump system that has a user defined time for the jump, to combat this problem. It was only going to be for personal use put if people find it useful i may post it up. :)

@ Emjlr3:

On the subject of this spell/Template. In this part of the spell:

JASS:
if u==null or damage<0. or area<0. then
        if GetLocalPlayer()==GetOwningPlayer(u) then
            call ClearTextMessages()
            call BJDebugMsg("|c00FF0000JST Error: Invalid inputs in function Cast.")
            call StartSound(S)
        endif
        return false
    endif


If u is null and then you are seeing if GetLocalPlayer() == GetOwningPlayer(u), what is u referring to?

Also, as i am making my own spell, i was hoping you could lend of hand. It seems as though when i get my testing unit to cast the spell, it still has its casting orders after the spell is finished so it will continually cast it over and over. Did you encounter something like this and would you know how to fix it? Maybe it is just my testing unit though... ill keep trying.
 

Silencer

New Member
Reaction score
0
I cant use it, do i need vJass ? Is vJass also available without the JNGP?

Here is the error message (care! my worldedit is in german)

Maybe the Problem is the importing of the spell. Or the problem is that i dont understand JASS :(
 

Attachments

  • Unbenannt.jpg
    Unbenannt.jpg
    130.2 KB · Views: 546

emjlr3

Change can be a good thing
Reaction score
395
needs a vJASS syntax compiler, yes

to help with the too slow issue - updating the jumpers location by a set distance/interval would solve this, rather then I have it now, where every jump takes X seconds - its an easy fix for someone who knows what they are doing
 

Romek

Super Moderator
Reaction score
964

emjlr3

Change can be a good thing
Reaction score
395
err wtf else would you do with it?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top