if you're trying to make an anti-stuck-trigger, i solved this by using the event - Any unit starts idling, and then instantly order it to move again. I did not find a way to check if a unit is moving
I need a condition to check the current order of a unit if it is moving. I can't use event because event is ocupied with periodic event for trigger purposes. Is there a condition like in wc3 editor that checks current order of unit? I can't seem to find it.
I think it would be a much better idea to build a secondary trigger that checks for the unit order events you're looking for and flags the unit by either saving to a table or assigning the equivalent of a custom value from WC3 to the unit that the main trigger can check for on its periodic event.
Do you really need to check for movement if the unit is performing a command you know will move it? If so the other thing you could do is add in a secondary function on your trigger that memorizes the X, Y position of the unit being evaluated and then compares it after a non-game halting wait to the new position of the unit.
Hello all, is there a way for me to check if a unit is moving in the condition? Thanks in advance!
Event - Any Unit Stops Being Idle
@JeffQ: Go
if you're trying to make an anti-stuck-trigger, i solved this by using the event - Any unit starts idling, and then instantly order it to move again. I did not find a way to check if a unit is moving
I need a condition to check the current order of a unit if it is moving. I can't use event because event is ocupied with periodic event for trigger purposes. Is there a condition like in wc3 editor that checks current order of unit? I can't seem to find it.
I haven't actually tried this, but here's a thought:
Build an "Or" list for all orders you want to filter for.
This would also trigger when the unit does anything else too, which may not be wanted.
I think it would be a much better idea to build a secondary trigger that checks for the unit order events you're looking for and flags the unit by either saving to a table or assigning the equivalent of a custom value from WC3 to the unit that the main trigger can check for on its periodic event.
Do you really need to check for movement if the unit is performing a command you know will move it? If so the other thing you could do is add in a secondary function on your trigger that memorizes the X, Y position of the unit being evaluated and then compares it after a non-game halting wait to the new position of the unit.
Actually, there is a Unit Group function that pick all of a player's idle units.