• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM stuck if moving platform hits player on y axis

S

SonicTheHedgehog+123

Guest
My vertical moving platform does go up and down. And if my player is between the platform and the floor the room restart how it should. But when I am jumping at the y axis of the platform the player gets stuck in it. I know why but I dont nowhow to fix it yet. The player gets stuck because when he jumps he changes his image_index.(his jump image)
Should I make a pushback an invicible wall or an other if statement?
Open for any help given.:D
Code:
if place_meeting(x,y+1,Beweger) && place_meeting(x,y+1,Wand) //checks if the player meeting floor and 1 pixel below moving platform
{room_goto(Restart)}
 

sv3nxd

Member
If you think the problem is the changing sprite, then maybe set the mask_index in your object.
mask_index expects a sprite-id, which the object uses for every boundary-box-calculation.

You could for example set it to "player_idle", so then no matter what the current sprite is, it will use the collision-mask of player_idle.
 
S

SonicTheHedgehog+123

Guest
I tested my game again and what I found out is that this problem(that the player gets stuck in the platform) only happens if the platform is moving downwards.So now I dont think it has to do with the image_index. I am working on it.
 
Top