- Joined
- Jul 25, 2009
- Messages
- 3,091
Okay, so I am making an arrow key movement system. How it's supposed to work, is when you combine left and right with forward it changes the angle slightly as you are moving. Like driving a car... Up key is gas, left and right are steering.
It turned out dismal, the only thing that works is the move forward command. Help.
The left and right key triggers are the same, just with different variables and arrow keys ofc, posting both of them is unnecessary. Tell me if I should post the forward actions.
It turned out dismal, the only thing that works is the move forward command. Help.
The left and right key triggers are the same, just with different variables and arrow keys ofc, posting both of them is unnecessary. Tell me if I should post the forward actions.
-
Left Key
-
Events
- Player - Player 1 (Red) Presses the Left Arrow key
- Player - Player 2 (Blue) Presses the Left Arrow key
- Player - Player 3 (Teal) Presses the Left Arrow key
- Player - Player 4 (Purple) Presses the Left Arrow key
- Player - Player 5 (Yellow) Presses the Left Arrow key
- Player - Player 6 (Orange) Presses the Left Arrow key
- Player - Player 7 (Green) Presses the Left Arrow key
- Player - Player 8 (Pink) Presses the Left Arrow key
- Player - Player 9 (Gray) Presses the Left Arrow key
- Player - Player 10 (Light Blue) Presses the Left Arrow key
- Player - Player 11 (Dark Green) Presses the Left Arrow key
- Player - Player 12 (Brown) Presses the Left Arrow key
- Conditions
-
Actions
- Player Group - Add (Triggering player) to XY_LeftMovingGroup
- Set XY_MovementLeft[(Player number of (Triggering player))] = True
-
Events
-
Left Key Released
-
Events
- Player - Player 1 (Red) Releases the Left Arrow key
- Player - Player 2 (Blue) Releases the Left Arrow key
- Player - Player 3 (Teal) Releases the Left Arrow key
- Player - Player 4 (Purple) Releases the Left Arrow key
- Player - Player 5 (Yellow) Releases the Left Arrow key
- Player - Player 6 (Orange) Releases the Left Arrow key
- Player - Player 7 (Green) Releases the Left Arrow key
- Player - Player 8 (Pink) Releases the Left Arrow key
- Player - Player 9 (Gray) Releases the Left Arrow key
- Player - Player 10 (Light Blue) Releases the Left Arrow key
- Player - Player 11 (Dark Green) Releases the Left Arrow key
- Player - Player 12 (Brown) Releases the Left Arrow key
- Conditions
-
Actions
- Player Group - Remove (Triggering player) from XY_LeftMovingGroup
- Set XY_MovementLeft[(Player number of (Triggering player))] = False
-
Events
-
Unit Is Moving Left
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in XY_LeftMovingGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- XY_MovementLeft[(Player number of (Picked player))] Equal to True
-
Then - Actions
- Set XY_TargetPoint[(Player number of (Picked player))] = (XY_TargetPoint[(Player number of (Picked player))] offset by 75.00 towards ((Facing of XY_ControlledUnit[(Player number of (Picked player))]) + 10.00) degrees)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in XY_LeftMovingGroup and do (Actions)
-
Events