D
DarthTenebris
Guest
Hello there my fellow programmers!
So I'm still working on my game, and I need help implementing a feature: wall jumping.
I followed a tutorial on youtube and put the code in, however, the code he (the tutorial) was using introduced a bug/glitch I ever experienced before, and clearly I didn't want it. So I decided to try to modify it and see if it works, but I can't get it to work. Here's some code:
Link to the tutorial:
(4:18)
I understand what the code does, yet it doesn't work...
Can anyone help me fix it up?
So I'm still working on my game, and I need help implementing a feature: wall jumping.
I followed a tutorial on youtube and put the code in, however, the code he (the tutorial) was using introduced a bug/glitch I ever experienced before, and clearly I didn't want it. So I decided to try to modify it and see if it works, but I can't get it to work. Here's some code:
Code:
if ((place_meeting(x,y + 1,obj_blockPar)) or ((place_meeting(x - 1,y,obj_blockPar)) && (keyboard_check_pressed(ord('D')))) or ((place_meeting(x + 1,y,obj_blockPar)) && (keyboard_check_pressed('A'))))
{
canJump = true;
}
else
{
canJump = false;
}
I understand what the code does, yet it doesn't work...
Can anyone help me fix it up?