- Joined
- Mar 6, 2006
- Messages
- 282
In my map, it's possible to dodge targeted spells. I'm wondering what's the most efficient way to check if a unit was stuck by a spell.
The obvious way is to make a new trigger with the event
On the actual spell's trigger, it would start a timer, constantly checking if the targeted unit was hit by the spell (with a buff or something). The timer would turn off after like 3 seconds (or however long, based on the nature of the spell), if the target was never hit.
So which way is better?
Side Question: what's faster,
The obvious way is to make a new trigger with the event
EVENT_PLAYER_UNIT_ATTACKED
and a condition checking for the specific spell. But wouldn't that run WAY too often? Units are constantly being attacked.. so I was wondering if this was better:On the actual spell's trigger, it would start a timer, constantly checking if the targeted unit was hit by the spell (with a buff or something). The timer would turn off after like 3 seconds (or however long, based on the nature of the spell), if the target was never hit.
So which way is better?
Side Question: what's faster,
IssueTargetOrder
or IssueTargetOrderById
?