I'm trying to detect an interrupt to initial orders (such as attack-move to opposite base) on a creep after it was slide/pushed or also if it was spat out after a devoured instance (a.i. creeps are Player Slot 6 & 12 which are similar to Undead and Nightelf in dota). The push effect is due to a move instantly custom loop spell while the devour is the non-custom skill such as from a dragon turle in Wc3. And then if detected I resorted to doing a follow the next creep since it seem pretty basic.
Sorry if the trigger is badly named "randomFollowIfStoppedIncludeAiOnly"
Code:
randomFollowIfStoppedIncludeAiOnly
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
Actions
Set newLOSTunit = (Ordered unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of newLOSTunit) Equal to Player 1 (Red)
(Owner of newLOSTunit) Equal to Player 2 (Blue)
(Owner of newLOSTunit) Equal to Player 3 (Teal)
(Owner of newLOSTunit) Equal to Player 4 (Purple)
(Owner of newLOSTunit) Equal to Player 5 (Yellow)
(Owner of newLOSTunit) Equal to Player 7 (Green)
(Owner of newLOSTunit) Equal to Player 8 (Pink)
(Owner of newLOSTunit) Equal to Player 9 (Gray)
(Owner of newLOSTunit) Equal to Player 10 (Light Blue)
(Owner of newLOSTunit) Equal to Player 11 (Dark Green)
(Owner of newLOSTunit) Equal to Neutral Hostile
(Owner of newLOSTunit) Equal to Neutral Victim
(Owner of newLOSTunit) Equal to Neutral Extra
(Owner of newLOSTunit) Equal to Neutral Passive
Then - Actions
Custom script: set udg_newLOSTunit=null
Skip remaining actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Issued order) Equal to (Order(stop))
(Issued order) Equal to (Order(move))
(Issued order) Equal to (Order((String(851987))))
(Issued order) Equal to (Order((String(851974))))
Then - Actions
Set Temp_Pos = (Position of newLOSTunit)
Unit - Order newLOSTunit to Right-Click Temp_Pos
Set Temp_Group = (Units within 512.00 of Temp_Pos matching (((Matching unit) Not equal to newLOSTunit) and (((Owner of (Matching unit)) Equal to Player 6 (Orange)) or (Player 12 (Brown) Equal to (Owner of (Matching unit))))))
Wait until ((Number of units in Temp_Group) Greater than or equal to 1), checking every 0.50 seconds
Unit - Order newLOSTunit to Right-Click (Random unit from Temp_Group)
Custom script: call DestroyGroup (udg_Temp_Group)
Custom script: set udg_newLOSTunit=null
Custom script: call RemoveLocation (udg_Temp_Pos)
Skip remaining actions
Else - Actions
Custom script: set udg_newLOSTunit=null
Skip remaining actions
Custom script: set udg_newLOSTunit=null
Skip remaining actions
Really need your help, guys. Thanks in advance.