The Player cannot move Left
- Open up the Player Object.
- Highlight the Keyboard Event <Left>.
- Have a look at the list of actions. Are they in the correct order?
- Is your Player moving correctly in the other directions? If it is you can compare the list of actions Keyboard Event <Left> to one of the other Keyboard Events.
- Or you can refer back to the Maze Tutorial on the The Player Object.
- The Else action at the bottom of the list has no meaning in that position.
- Try putting the Else action above the second Move Fixed action (number 5).
- Conditional statements can have a single consequence or two consequences. When there are two consequences we use an Else to demonstrate this.
- When a conditional statement is set up with one consequence for satisfying the conditional statement and another consequence if the condition is not met, the second consequence MUST follow the Else action.
- Examples of conditional statements with one and two consequences are included in this Event.
- The Actions read as follows:
- If the instance is NOT aligned with the grid (remember that the NOT box is checked for this action).
- The Event is exited.
- If there is NOT a wall at the position RELATIVE to the PLayer
- The Player will move Left (speed is set to 4)
- The Player will Stop (speed is set at zero)