• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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: 790
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