Move
Events
Time - ZXtimer expires
Conditions
ZXheld Equal to 0
Actions
Set ZXp = (Position of ZXball)
Unit Group - Pick every unit in (Units within 90.00 of ZXp) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Picked unit) Not equal to ZXball
ZXheld Not equal to (Player number of (Owner of (Picked unit)))
ZX_ifkicked[(Player number of (Owner of (Picked unit)))] Equal to False
Then - Actions
Set ZXunit = (Picked unit)
Set ZXheld = (Player number of (Owner of (Picked unit)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ZX_speed Greater than 0.00
Then - Actions
Set ZX_speed = (ZX_speed - 0.08)
Set ZXx = ZX_speed
Set ZXy = ZX_speed
-------- North --------
Set ZXp2 = (ZXp offset by (0.00, 30.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at ZXp2 of type Walkability is off) Equal to True
Then - Actions
Set ZXy = (ZXy x -1.00)
Else - Actions
-------- East --------
Set ZXp2 = (ZXp offset by (30.00, 0.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at ZXp2 of type Walkability is off) Equal to True
Then - Actions
Set ZXx = (ZXx x -1.00)
Else - Actions
-------- South --------
Set ZXp2 = (ZXp offset by (0.00, -30.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at ZXp2 of type Walkability is off) Equal to True
Then - Actions
Set ZXy = (ZXy x -1.00)
Else - Actions
-------- West --------
Set ZXp2 = (ZXp offset by (-30.00, 0.00))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain pathing at ZXp2 of type Walkability is off) Equal to True
Then - Actions
Set ZXx = (ZXx x -1.00)
Else - Actions
-------- --------
Custom script: call SetUnitX(udg_ZXball, GetUnitX(udg_ZXball) + udg_ZXx)
Custom script: call SetUnitY(udg_ZXball, GetUnitY(udg_ZXball) + udg_ZXy)
Else - Actions