Hey guys, I have been making a small hero defense map as JASS practice while I have been learning it, and I got sidetracked try to make a waveform spell (morphling) with GUI.
The spell itself is smooth, except that no matter what, if I use Target Point of Ability Being Cast it will always wave to the middle of the map.
While trying to find out why, the closest thing I could come across is this, but it doesn't seem to apply to my trigger.
I'll paste the first trigger if anyone can help me shed some light on this. Thank you guys for your time, I really appreciate it.
The spell itself is smooth, except that no matter what, if I use Target Point of Ability Being Cast it will always wave to the middle of the map.
While trying to find out why, the closest thing I could come across is this, but it doesn't seem to apply to my trigger.
14) Why are my units moved to the center of the map when in the trigger I move them to (Target Point of Ability Being Cast)?
That's probably because you accessed the (Target Point of Ability Being Cast) after a wait. Similar constants such as (Casting Unit), (Attacking Unit), (Target Unit of Ability Being Cast) and others are reset after the smallest wait. You can solve this by using variables to store them or in some cases, you can use (Triggering Unit). It is one of the few constants that is not affected by waits.
I'll paste the first trigger if anyone can help me shed some light on this. Thank you guys for your time, I really appreciate it.
HTML:
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Wave Form
Actions
Set WFend = (Target point of ability being cast)
Set WFhero = (Triggering unit)
Set WFstart = (Position of WFhero)
Set WFtemp = (Position of WFhero)
Set WFlength = (Distance between WFstart and WFend)
Set WFcounter = 0
Unit - Hide WFhero
Trigger - Turn on Waveform Effects <gen>