GMS 2 [Found A different way]How do I check when obj is not colliding with other obj?

D

Dylaniza

Guest
I am trying to make it so when player isn't colliding with ground it will set a varible grav to 1. I tried
if place_meeting(x,y,obj_collision)
then
{
grav = 0;
}else{
grav = 1;
}

But it doesn't seem to be turning it to 1 when it is collided with obj_collision because player isn't able to move since it is still being sent down, I can't post the part where if grav is equal to one it jumps to point relative by 1 in y since I did this with drag and drop. ps this is is step event, I also have created this variable in a create event.
 
D

Dylaniza

Guest
Was trying to make a simple platformer code I might understand since all the ones I have tried always don't work well when I make them, guess I shouldn't try making my own code if I still can't use other peoples right XD Gonna have another search for a simple platformer that works well on GMS2, thanks for the replies though.
 
Top