bradleydfc
Member
Hey there guys.
Problem
I'm making a puzzle, a jumping one in fact. You have to jump to tiles in order to progress through the room... However I have encountered a problem with the code I am using (see below). It is currently allowing the player to jump anywhere, including the black floor and non-passable tiles, which is where I do not want him to jump to. I am calling the common event below, when the action button is pressed (so basically, press enter and the player jumps).
The Question
How do I make it so that when the player jumps, the hero will jump forward three tiles onto another tile, but when there is a non-passable tile such as the black floor, he will not move anywhere, and instead wait for him to press enter whilst facing another direction?
Here is the code:
Thank you very much,
~Brad.
Problem
I'm making a puzzle, a jumping one in fact. You have to jump to tiles in order to progress through the room... However I have encountered a problem with the code I am using (see below). It is currently allowing the player to jump anywhere, including the black floor and non-passable tiles, which is where I do not want him to jump to. I am calling the common event below, when the action button is pressed (so basically, press enter and the player jumps).
The Question
How do I make it so that when the player jumps, the hero will jump forward three tiles onto another tile, but when there is a non-passable tile such as the black floor, he will not move anywhere, and instead wait for him to press enter whilst facing another direction?
Here is the code:
Code:
if player is facing right
set move route: player (Skip, Wait)
jump +3, 0
if player is facing left
set move route: player (Skip, Wait)
jump -3, 0
if player is facing down
set move route: player (Skip, Wait)
jump 0, 3
if player is facing up
set move route: player (Skip, Wait)
jump 0, -3
Thank you very much,
~Brad.