- Joined
- Nov 6, 2009
- Messages
- 1,456
This is my loop trigger I'm trying to make it work like a knock back system to find collision detection for my camera system, and something isn't quite working right The distance is being set to 0 instead of the appropriate real number.
-
CheckLooper
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




Set TempPN = (Player number of (Owner of (Picked unit)))
-




Set TempAngle = (((Facing of PlayerHero[TempPN]) - 180.00) + 0.00)
-




Set TempPoint = ((Position of (Picked unit)) offset by 8.00 towards ((Facing of PlayerHero[TempPN]) + 180.00) degrees)
-




Set CamDisTempPoint = (Position of PlayerHero[TempPN])
-




Unit - Move (Picked unit) instantly to TempPoint
-




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





If - Conditions
-






((Picked unit) is in (Units within 1100.00 of CamDisTempPoint)) Equal to False
-
-





Then - Actions
-






Set PlayerMaxCamDistance[TempPN] = 1150.00
-






Unit - Remove (Picked unit) from the game
-
-





Else - Actions
-
-




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





If - Conditions
-






((Picked unit) is in (Units within 3.00 of TempPoint)) Equal to False
-
-





Then - Actions
-






Set PlayerMaxCamDistance[TempPN] = (Distance between CamDisTempPoint and TempPoint)
-






Unit - Remove (Picked unit) from the game
-
-





Else - Actions
-
-




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





If - Conditions
-






(Number of units in DistanceCheckerGroup) Equal to 0
-
-





Then - Actions
-






Trigger - Turn off (This trigger)
-
-





Else - Actions
-
-




Custom script: call RemoveLocation(udg_TempPoint)
-




Custom script: call RemoveLocation(udg_CamDisTempPoint)
-
-
-
-





