- Joined
- May 24, 2016
- Messages
- 339
So I have an scripted AI units making them to attack nearby units.
1)Some units may return to their start position, only after they respond to timer, checking if they are execute attack order
2)When a group gets larger, it becomes to brake often on their way. I guess it is realted with a fact I force to give an order separately to each unit in a group.
Also I wonder is it a correct way (GetUnitCurrentOrder(F) != String2OrderId("attack")) to check if unit is executing attack command right now.
1)Some units may return to their start position, only after they respond to timer, checking if they are execute attack order
Code:
if FocusedUnit[i] != null and GetUnitCurrentOrder(F) != String2OrderId("attack") then
call IssuePointOrder(F, "attack", GetUnitX(FocusedUnit[i]), GetUnitY(FocusedUnit[i]))
endif
Also I wonder is it a correct way (GetUnitCurrentOrder(F) != String2OrderId("attack")) to check if unit is executing attack command right now.