• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Target Point of an Ability Being Cast

Status
Not open for further replies.
Level 1
Joined
Jan 8, 2013
Messages
5
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.


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>
 
Level 1
Joined
Jan 8, 2013
Messages
5
I have seen people link their triggers into their posts, no idea how to do that just yet, so here's an image.
 

Attachments

  • waveform.png
    waveform.png
    78.1 KB · Views: 804
Level 1
Joined
Jan 8, 2013
Messages
5
It works perfectly. Thanks a lot guys, I really appreciate it. I'll give that a read too Maker, cheers.
 
Status
Not open for further replies.
Top