• 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] Special effect travel

Status
Not open for further replies.
Level 4
Joined
Sep 6, 2012
Messages
19
Trying to make a trgger that makes a special effect travel from one unit to the caster. Now I'm aiming I would need 1 or 2 unit variables, and integer variable and a count down timer. I'm just not sure how to set it up. Also the target of the spell must be in X range from the caster for the special effect travel til take place. And when the unit.is in range, when the.special.effect.reaches the caster , heal the caster for X amount
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
What you call a special effect, is actually, a dummy unit with the model of the effect. You create the unit and add it to a group. You save the target of the dummy in the group, and, as long as the target is alive, you set the position of the dummy a bit nearer to the target, every 0.03 seconds, using Polar Projection.

For the spell range, just check if distance between position of the caster and position of the target is *TheRangeYouWant*

When distance between target and dummy effect is less than or equal to 10 (or so) you destroy the dummy, and do the effect you want.

You could also do it with a timer, but a 0.03 periodic trigger is good enough.
 
Level 8
Joined
Oct 26, 2008
Messages
387
Trying to make a trgger that makes a special effect travel from one unit to the caster. Now I'm aiming I would need 1 or 2 unit variables, and integer variable and a count down timer. I'm just not sure how to set it up. Also the target of the spell must be in X range from the caster for the special effect travel til take place. And when the unit.is in range, when the.special.effect.reaches the caster , heal the caster for X amount

You mean, makes the target disappear, and then have a special effect coming towards the caster? and then the targetd appearing near the caster?
If so, there is a spell in wc3 that does that,

Items - > Gem of Summoning or something like that, does the exact same thing, you will have to do the heal with triggers though..
 
Status
Not open for further replies.
Top