WayTooShort
New Member
- Reaction score
- 4
I have a sliding part in my map, and players are supposed to be able to cast spells while sliding. What I have is:
1.) A slide trigger that moves the unit every 0.03 seconds with SetUnitPosition.
2.) A trigger that detects when unit is issued a spell order and turns on trigger 3 and turns off trigger 1.
3.) A trigger that works as trigger 1 but uses SetUnitX and SetUnitY instead of SetUnitPosition.
In case you didn't know: moving with SetUnitPosition interrupts the unit's current orders, SetUnitX/Y doesn't interrupt them.
Problem: When unit is ordered to cast a spell at something out of the cast range, it is forced to walk until it can cast the spell. This makes the sliding really bugged, since SetUnitX/Y doesn't interrupt the move order. And I can't use SetUnitPosition either, since then the unit wouldn't cast the spell.
What can I do?
1.) A slide trigger that moves the unit every 0.03 seconds with SetUnitPosition.
2.) A trigger that detects when unit is issued a spell order and turns on trigger 3 and turns off trigger 1.
3.) A trigger that works as trigger 1 but uses SetUnitX and SetUnitY instead of SetUnitPosition.
In case you didn't know: moving with SetUnitPosition interrupts the unit's current orders, SetUnitX/Y doesn't interrupt them.
Problem: When unit is ordered to cast a spell at something out of the cast range, it is forced to walk until it can cast the spell. This makes the sliding really bugged, since SetUnitX/Y doesn't interrupt the move order. And I can't use SetUnitPosition either, since then the unit wouldn't cast the spell.
What can I do?