Detect when ability hits

Status
Not open for further replies.
Level 7
Joined
Nov 19, 2007
Messages
253
Hi all,

Like title says is there any way to detect when abillity (like storm bolt) hits the target? I know how to detect if target isnt moving then wait time = distance/speed, but problem is moving target.
 
Give the ability a Buff effect (Stormbolt uses a stun buff for example) and use a rapidly firing period trigger (say, every 0.03 seconds) to check for units with that buff and run the actions from there. To avoid it running more than once, add the picked unit to a unit group, and don't run the actions if the unit's already in the said group. You can then remove the buff immediatly after, and remove the unit from the group, allowing it to be retargetted later.

This method is about as accurate as you can get it without using a damage detection system (which can be quite cumbersome).
 
Can you show me how that trigger looks because I didnt understand "To avoid it running more than once, add the picked unit to a unit group, and don't run the actions if the unit's already in the said group. You can then remove the buff immediatly after, and remove the unit from the group, allowing it to be retargetted later." part.
 
When your using missles as projectiles to detect when it hits a unit, just make your ability missle-less, and use a unit as the missle, then move the unit unit with a periodic time event (0.05 is fair enough since the eye can only see 24 frames per second), and have a trigger check the event "If unit comes in range", and apply the condition to check if it's that projectile unit you made.
 
thats much harder than damage's suggestion.
conditions for damage's suggestion would be (on top of conditions you already have) triggering unit is in StormboltUnitGroup equal to false
actions: add triggering unit to StormboltUnitGroup
 
Status
Not open for further replies.
Back
Top