- Joined
- Oct 18, 2008
- Messages
- 1,591
Eh, closest unit-finding is a bit complex xD I found an alternative method, but my question is: is there anyway to find those units who are NOT moving? I tryed Issue order:stop but didn't work -.-
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(Issued order) Equal to (order(<Empty String>))
Trigger
Events

Time - Every 1.00 seconds of game-time
Conditions
Actions

Set Temp_Group = (Units of type X)

Unit Group - Pick every unit in (Temp_Group) and do (Actions)


Loop - Actions



If (All conditions are true) then do (Actions) else do (Actions)




If - Conditions





(Current order of (Picked unit)) Equal to (order(<Empty String>))




Then - Actions





Do your actions here




Else - Actions

Custom script: call DestroyGroup (udg_Temp_Group)
Zombie Move

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green)) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Or - Any (Conditions) are true







Conditions








(Current order of (Picked unit)) Equal to (Order(<Empty String>))








(Current order of (Picked unit)) Equal to (Order(Stop))





Then - Actions






Unit - Order (Picked unit) to Stop






Wait 0.10 seconds






Unit - Order (Picked unit) to Attack-Move To (Position of (Random unit from (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Equal to Is playing))))





Else - Actions
Zombie Move

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


Set Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Equal to Is playing))


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Unit matching (Matching unit is owned by a Computer Player Equal to True)) and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Or - Any (Conditions) are true







Conditions








(Current order of (Picked unit)) Equal to (Order(<Empty String>))








(Current order of (Picked unit)) Equal to (Order(Stop))





Then - Actions






Set Point = (Unit - Position of (Random unit from Group))






Unit - Order (Picked unit) to Attack-Move To Point






Custom script: call RemoveLocation( udg_Point )





Else - Actions


Custom script: call DestroyForce( udg_Group )
Not good... In multiplayer random unit code is not good -.-
Zombie Move

Events


Time - Every 2.00 seconds of game time

Conditions

Actions


Set Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) slot status) Equal to Is playing))


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Unit matching (Matching unit is owned by a Computer Player Equal to True)) and do (Actions)



Loop - Actions




Unit - Set Custom Value of (Picked Unit) to (Custom Value of Picked Unit - 1)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Custom Value of (Picked Unit) Less than or Equal to 1






Or - Any (Conditions) are true







Conditions








(Current order of (Picked unit)) Equal to (Order(<Empty String>))








(Current order of (Picked unit)) Equal to (Order(Stop))





Then - Actions






Set Point = (Unit - Position of (Random unit from Group))






Unit - Order (Picked unit) to Attack-Move To Point






Custom script: call RemoveLocation( udg_Point )





Else - Actions


Custom script: call DestroyForce( udg_Group )