So I'm trying to make some sort of puzzle, comparable with the 8th gym leader in Pokemon Ruby and Sapphire, where you need to crack all the ice floors to proceed to the next stage, if you fail, you fall through the floor and have to start over again.
The problem is in the second stage of the system. I can make the frame change from 0 to 1, so from a non-cracked floor to a cracked floor (simply by ' When Player is overlapping with floor, change frame to "frame cracked floor".
But when I try to proceed to do the 'from cracked floor to hole in the ground' stage, I run into a problem, because when I would do the first step over again, so
"When Player is overlapping with floor, while being on frame "cracked floor", set frame to "hole in the ground""
It'll just go straight from frame 'floor' to frame 'hole' because it's still on collision with it. So it basically just skips the 'cracked floor'.. Even though that does seems logical to me, I really don't know how to fix it.
Tried the 'on collision' event, but the outcome is thesame
Some help would be very appreciated!
Develop games in your browser. Powerful, performant & highly capable.
A simple way to do it is to store the UID of the tile that the player is standing on, and use that to make sure that its not triggering several times.
So to do that:
1. Make a variable for the player called "Tile_UID"
2. Whenever the player move to a tile you do: "Player.Tile_UID = Tile.UID" this you add to the overlapping action.
3. In the overlapping event you add the condition: Player.Tile_UID not Equal to Tile.UID Since in (2) you set the "Player.Tile_UID to the Tile.UID" the player have to leave the tile before it can trigger again.
Ok Thank you,
This almost works pretty much how I wanted it. One problem though..
All the tile's are next to each other, which means that once the player starts moving,
the Player.Tile_UID changes, but the Player is still connecting to the Tile it just started leaving, so it'll trigger it too soon again..
Could that be helped?
But it's weird though, it seems this problem is only there when the player walks to the left, not when it goes to the right..
might try a few things, but help is always welcome!
So apparently it had something to do with the collision polygons of the player sprite, changed it now and it seems to work!
Thanks so much!