• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Wall Jump Collision Issue

V

VaporaLight

Guest
Hello I'm new to gamemaker studio 2 and lately i've been having issues with implementing a wall jump feature. In this piece of code, the object player, as it slides down the wall and once i press the jump button, jumps and when its near the wall it seems to stop mid air. How do i prevent this and what caused this collision issue?

var Wall_Left = argument0;
var Wall_Right = argument1;
if(Wall_Left && global.key_jump) // when player is on left wall
{
show_debug_message("Jump to the Right");
x -= hsp * 11; // hsp = 2
y -= maxJumpPower * 2; // maxJumpPower = 15
}
else if(Wall_Right && global.key_jump)// when player is on right wall
{
show_debug_message("Jump to the Left");
x -= hsp * 11; // hsp = 2
y -= maxJumpPower * 2; // maxJumpPower = 15
}

Gif for example
https://media.giphy.com/media/h2lRVBYe65SjJ1kPw4/giphy.gif

Strangely, changing the values of the number 11 in both x values to 10 suddenly makes the player slide down the wall smoothly.
https://media.giphy.com/media/SATqRbqisINVFmUfIn/giphy.gif
 
V

VaporaLight

Guest
Am I still being evaluated for approval to post here? Am I not following the guidelines of posting in this forums? If so, then would a moderator delete this and advise me to make a better post that fits the guidelines. I still need help here in this post
 
Top