- Joined
- Oct 9, 2015
- Messages
- 721
Hi everyone, so I have made a push system that pushes units away from a horse if it's moving, however units are only pushed onward and backwards from it's current location, this creates a wierd effect, I want to make them spread as the horse passes trought them, how can I achieve that ?
-
pushing
-
Events
-
Time - Every 0.02 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 50.00 of (Position of UnitHorse[(Integer A)])) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Picked unit)) is an ally of (Owner of UnitHorse[(Integer A)])) Equal to False
-
Mounted[(Integer A)] Equal to True
-
IsRunning[(Integer A)] Equal to True
-
-
Then - Actions
-
Set PushUnit = (Picked unit)
-
Set Loc1 = (Position of PushUnit)
-
Set Loc2 = (Loc1 offset by -5.00 towards (Facing of PushUnit) degrees)
-
Unit - Move PushUnit instantly to Loc2, facing (Facing of PushUnit) degrees
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Facing of UnitHorse[(Integer A)]) + 120.00) Greater than or equal to (Facing of PushUnit)
-
((Facing of UnitHorse[(Integer A)]) - 120.00) Less than or equal to (Facing of PushUnit)
-
-
Then - Actions
-
Set Loc2 = (Loc1 offset by 5.00 towards (Facing of PushUnit) degrees)
-
Unit - Move PushUnit instantly to Loc2, facing (Facing of PushUnit) degrees
-
-
Else - Actions
-
-
Set PushUnit = No unit
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_Loc1)
-
Custom script: call RemoveLocation(udg_Loc2)
-
-
-
-
-
-
-
-