• 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.

Spells

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2008
Messages
253
How do I easily make a trigger that when u cast a spell the target gets damage, and not that I do damage before the missile actually hit the target. How do I make this? Help would be nice

Can be either GUI or JASS
 
Level 9
Joined
May 27, 2006
Messages
498
You want to deal damage via trigger that launches when an ability is being cast?
You would have to get the distance between the caster and the target and then divide it by speed of your spell missile. Then do a wait action with the value you got from the calculation.
 
Level 25
Joined
Jun 5, 2008
Messages
2,573
I had the same problem, using: "Unit begins/finishes casting" ain't precise but the "Unit starts the effect of ability" is precise.
So example base your spell on shadow strike or the storm bolt just use:
  • Events - Unit starts the effect of ability
  • Conditions - Ability being cast equal to *your ability*
  • Actions - Unit cause casting unit to damage *target* dealing *x* damage
It will trigger as soon the missile strikes the enemy/friend but i think you first need to store the *target* as :"Event response - Target of ability being cast" in a second :"Unit begins casting" trigger.
Should work as a charm :)
 
Level 24
Joined
May 9, 2007
Messages
3,563
That doesn't effect when the missile collides with the target.

If you want to make it in GUI, I wouldn't recommend it, but if you do:

Check the position of the missile (which is a dummy unit) every 0.03 seconds. If the number of nearby units matching condition( Enemies of (Owner of Unit (MissileUnit))) > 0 then: Effects.

Also, update the position of the unit.

But just check out the spell section, for a better version.
 
Status
Not open for further replies.
Top