Collision Dectection/ Distance Checker GUI

Status
Not open for further replies.

Forgotten_Warlord

Level 22
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)
I'm not too worried about leaks right now, I'm going to clean it up when I put it into my map.

Forgotten_Warlord

Level 22
where is PlayerHero[TempPN]????...

its set in a different trigger
it never changes unless you repick

mckill2009

Level 29
set to 0 means >>> PlayerMaxCamDistance[TempPN]???...

can you put a debug message if this line works;
>>>put debug gere
Set PlayerMaxCamDistance[TempPN] = (Distance between CamDisTempPoint and TempPoint)
Unit - Remove (Picked unit) from the game

Maker

Level 37
Describe what the trigger is supposed to do. The if/then/elses run even when they shouldn't.

Status
Not open for further replies.

Replies
0
Views
431
Replies
2
Views
380
Replies
9
Views
465
Replies
6
Views
578
Replies
2
Views
496