• 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!

How To Create One Way Platforms

T

TGSP

Guest
So, let me just start off by saying that I'm a beginner in game maker. Though I do know some basic gml coding. In the game I'm currently working on I need to make one way platforms (platforms that I can jump through from the bottom but when on top I don't fall back through). How exactly would I go about doing this? What's the most simplistic way of going about such a matter? I've been searching for hours on youtube and on forums all over the internet but considering my current physics and movements I can't find a way to make one way platforms feasible.
 
U

UncookedChickens

Guest
Well, I'm not much of an expert on the subject myself, but i can give you the most simplistic way to do this:
Code:
//This code is written assuming that your player lands on SOLID objects

//In the STEP event: (of obj_platform)
if(obj_player.y < y){
    //makes the platform object the opposite of solid
    object_set_solid(obj_player,false);
}else{
    //makes the platform object solid
    object_set_solid(obj_player,true);
}
I believe that's it! Hope this works for you!!!!!!!!!:banana:
 
T

TGSP

Guest
Thank you for your replies I was actually able to figure out how to get it working by following rexfurry's tutorial on youtube :D
 
Top