Wratox1
Member
- Reaction score
- 22
okay, so i have this trigger:
what it's supposed to do is making me able to push a box, but only north, south, east and west.
but when i test it, i am only able to push the box north and east. And sometimes, if i sort of glitch it, west.
Could someone tell me what is wrong with the trigger? Or maybe help me make a new system that works..
thanks
Trigger:
- push box
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- shield_active Equal to True
- Actions
- Set pushing_unit = u
- Set pushing_unit_loc = (Position of pushing_unit)
- Set pushing_angle = (Facing of pushing_unit)
- Game - Display to (All players) the text: (String(pushing_angle))
- Unit Group - Pick every unit in (Units within 64.00 of pushing_unit_loc matching ((Unit-type of (Matching unit)) Equal to Box)) and do (Actions)
- Loop - Actions
- Set pushed_unit = (Picked unit)
- Set pushed_unit_loc = (Position of pushed_unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Angle from pushing_unit_loc to pushed_unit_loc) Greater than 315.00
- (Angle from pushing_unit_loc to pushed_unit_loc) Less than 45.00
- Then - Actions
- Set pushed_angle = 0.00
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Angle from pushing_unit_loc to pushed_unit_loc) Greater than 45.00
- (Angle from pushing_unit_loc to pushed_unit_loc) Less than 135.00
- Then - Actions
- Set pushed_angle = 90.00
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Angle from pushing_unit_loc to pushed_unit_loc) Greater than 135.00
- (Angle from pushing_unit_loc to pushed_unit_loc) Less than 225.00
- Then - Actions
- Set pushed_angle = 180.00
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Angle from pushing_unit_loc to pushed_unit_loc) Greater than 225.00
- (Angle from pushing_unit_loc to pushed_unit_loc) Less than 315.00
- Then - Actions
- Set pushed_angle = 270.00
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Set pushed_unit_new_loc = (pushed_unit_loc offset by 2.00 towards pushed_angle degrees)
- Unit - Move pushed_unit instantly to pushed_unit_new_loc
- Loop - Actions
- Custom script: call RemoveLocation(udg_pushing_unit_loc)
- Custom script: call RemoveLocation(udg_pushed_unit_loc)
- Custom script: call RemoveLocation(udg_pushed_unit_new_loc)
- Events
what it's supposed to do is making me able to push a box, but only north, south, east and west.
but when i test it, i am only able to push the box north and east. And sometimes, if i sort of glitch it, west.
Could someone tell me what is wrong with the trigger? Or maybe help me make a new system that works..
thanks