Template Jumping Spell Template v3

its not a problem
 
major, heavy duty updates, check it out!!!
 
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?
 
Yes, this needs NewGen to compile this code so Warcraft can understand it.
 
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?
 
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?
 
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.
 
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: 580
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
 
err wtf else would you do with it?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    I agree that the effect of that would be to depress asset prices, but I think that's a good thing. Makes it easier for hard working young people to grow their retirement income
    +1
  • seph ir oth seph ir oth:
    Potential problem for a wealth tax for the US would be the ultra rich just offshoring assets in another country without a wealth tax. Those that would eat the wealth tax on, say, stocks, would be the middle class that puts money slowly into the market via the likes of funds.
  • seph ir oth seph ir oth:
    happy US election day btw!
  • Varine Varine:
    Oh election day
  • The Helper The Helper:
    Election day has come and gone now it is time to sit back and watch the liberals melt down. At least it should be peaceful around my house as my roommate is as trumper as you can get.
    +2
  • jonas jonas:
    curious what the next years will bring
  • jonas jonas:
    I think at least it's good that Trump has a solid lead in the popular vote
  • The Helper The Helper:
    It will depend on what happens with the house race. The Conservatives have the president and the senate, I believe the house majority is up too. With the conservatives stacked in the supreme court now would be the time they could really do something
  • The Helper The Helper:
    I just hope its not anything stupid like banning abortion nationally or doubling down on the border wall
  • jonas jonas:
    Well, the border wall at least doesn't really harm anyone. It's true that Trump only managed to add about new 80 miles to the 650 miles built by Obama and Bush, and that it didn't do much to reduce the number of illegal immigrants, but still, it's construction jobs and doesn't hurt anyone.
  • jonas jonas:
    One can of course argue whether the money is better spent somewhere else, like reducing taxes
  • jonas jonas:
    I'm more curious what Trump will do in foreign policy and how that will affect the US/European coalition, and the balance of power in europe and ME
  • The Helper The Helper:
    I am more of a fan of fixing the broken immigration laws and looking at protecting border with drone tech or some other way I mean I just think its ridiculous to build a great wall of mexico
    +2
  • Ghan Ghan:
    Trump's foreign policy was fantastic in his last term. More of that, please. Finish the Abraham Accords. Get Saudi in. Build the coalition against Iran.
    +1
  • Lord of Bourbon Lord of Bourbon:
    Just a friendly reminder to watch your sodium intake, too much can result in harmful effects
    +1
  • The Helper The Helper:
    Thank you for the health tip Lord of Bourbon!
  • The Helper The Helper:
    I hate to even say anything because it always seems to start again after I do it but the bots have been gone for like 3 days now. Looks like the AI scraping bots are onto better pastures, are done sucking us dry, or are taking a vactation :)
  • Lord of Bourbon Lord of Bourbon:
    The bots are probably mining salt else where right now, given that the mines have reopened.
  • The Helper The Helper:
    Got a user online that has like 10 different accounts dating back like 7 years and he is cycling through them. I have too much time on my hands LOL
    +1
  • The Helper The Helper:
    like half of them are banned with no notes why
  • The Helper The Helper:
    I made this the other day it was Awesome! Chicken Pot Pie Pasta - https://www.thehelper.net/threads/chicken-chicken-pot-pie-pasta.197065/
  • The Helper The Helper:
    New Thanksgiving Holiday Appetizer recipe Turking Stuffing Balls - https://www.thehelper.net/threads/appetizer-turkey-stuffing-balls.197078/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top