• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Small question

Status
Not open for further replies.
Level 2
Joined
Jul 16, 2012
Messages
6
How do i make for example this spell to deal damage when the hammer reaches target not instantly after use?


Untitled Trigger 003
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Storm Bolt
Actions
Set Caster = (Triggering unit)
Set Target = (Target unit of ability being cast)
Unit - Cause Caster to damage Target, dealing (Real((Intelligence of Caster (Include bonuses)))) damage of attack type Spells and damage type Normal
 
Level 9
Joined
Apr 19, 2011
Messages
447
You will have to add a delay until the spell hits the target.
In the Object Editor you can see the proyectile movement speed of your ability.
That speed is the distance the proyectile will travel per second. I mean, if it has a speed movement of 1000, it will travel a distance of 1000 per second.
If you want to know how much time will take the proyectile to reach the target, you'll have to make a simple arithmetic operation.
Just divide the distance between the caster and the target by the speed of the proyectile. That'll be the time you have to wait. This should be a very precise timing, and I heard that using the function "Wait" is inaccurate, so I recommend you to find another way to create the delay.

Hope I helped.

Regards
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,199
In StarCraft II you can add an event that fires when the missile effect impacts on the target and runs another effect. In WarCraft III sadly you have to use buggy missile detection algorithms that have huge code overhead and are not always reliable. This is just one of the reasons why people should consider moving to StarCraft II.
 
Status
Not open for further replies.
Top