Nonstopkombat
Member
I wanted to make a game and needed collision for walls for a room with a hallway and most posts here for wall collision don't work, here is my player step script;
I don't know if anyone can help me with finding collision for walls or on how to properly make one.
If you need any more information, just ask me, I'm new to gms 2 and just trying to get the basics.
Most of the scripts I've seen people use, still makes my character phase through the wall.
Code:
x = x +0;
if keyboard_check(vk_left)
{
x = x - 3
}
else if keyboard_check(vk_right)
{
x = x + 3
}
else if keyboard_check(vk_up)
{
y = y - 2
}
else if keyboard_check(vk_down)
{
y = y + 2
}
if keyboard_check(ord("A"))
{
x = x - 4
}
if keyboard_check(ord("D"))
{
x = x + 4
}
if keyboard_check(ord("W"))
{
y = y - 4
}
if keyboard_check(ord("S"))
{
y = y + 4
end
If you need any more information, just ask me, I'm new to gms 2 and just trying to get the basics.
Most of the scripts I've seen people use, still makes my character phase through the wall.