Z
zogo
Guest
hey,
I am using game maker 1.4.1
when I play my character go through the wall, and the walls are solid
here is my coding for character movement:
key_right = keyboard_check(vk_right);
key_left = -keyboard_check(vk_left);
key_jump = keyboard_check_pressed(vk_up);
key_up = keyboard_check(vk_up)
key_down = keyboard_check(vk_down)
move = key_left + key_right;
hsp = move * movespeed;
if (vsp < 10) vsp += grav;
if (place_meeting(x,y+1,Owall))
{vsp = key_jump * -jumpspeed}
and this is the variable
hsp = 0;
vsp = 0;
grav = 0.3;
grounded = (hsp = 0 and vsp = 0);
jumpspeed = 5;
movespeed = 4;
facing = 0;
I am using game maker 1.4.1
when I play my character go through the wall, and the walls are solid
here is my coding for character movement:
key_right = keyboard_check(vk_right);
key_left = -keyboard_check(vk_left);
key_jump = keyboard_check_pressed(vk_up);
key_up = keyboard_check(vk_up)
key_down = keyboard_check(vk_down)
move = key_left + key_right;
hsp = move * movespeed;
if (vsp < 10) vsp += grav;
if (place_meeting(x,y+1,Owall))
{vsp = key_jump * -jumpspeed}
and this is the variable
hsp = 0;
vsp = 0;
grav = 0.3;
grounded = (hsp = 0 and vsp = 0);
jumpspeed = 5;
movespeed = 4;
facing = 0;