Game Maker Studio: How to Master Gravity, Jump, & Wall Collision.
Visit my Search Arena site: https://searcharena.wordpress.com/
GMX File: https://bit.ly/2I1yOP4
Was not talked about in video. Be sure that personright collision is set to land, and the action code is down below, when personright makes contact with land.
Only the goleft and personleftwalk get the collision with wall, action is set to "move free", direction 0, speed 0, do not check relative. The "wall" is set to solid, and do not check visible.
personright
Events:
Step
Actions:
if !place_meeting(x, y + 1, land)
{
gravity = 10;
}
else
{
gravity = 0;
}
personright
Events:
collision with land, be sure land is set to solid
Actions:
move_contact_solid(direction,8);
vspeed=0;
Events:
personright
Events:
press Up
Actions:
if !place_free(x,y+1){
action = "air";
vspeed -= 80;
}