I
IE Entertainment
Guest
This seems like an easy fix and a novice issue but all of a sudden out of nowhere, the player in my game gets stuck in the ground after a jump is landed. I'm using a variable jump so it only happens after a "light" tap of the jump button. The game had been running fine for many weeks with no issues. Now all of a sudden this happens and I can't figure out why. There does NOT seem to be ANY alteration in my code.
One weird thing did happen. I'm thinking that maybe on accident I hit a button on the keyboard that changed something that I can't get a fix on because when I looked at my room window, for some reason many of the sprites, mainly the ground and walls were shifted slightly out of place.
You guys have any ideas about what I could be missing? Something I'm not considering. Thanks!
Here is the jump and ground collision code im using:
//Check For Ground
if (place_meeting(x, y+1, par_wall)) {
//airjump = 1;
vspd = 0;
//Jumping
if (jump_key) {
vspd = -jspd
}
} else {
//Gravity
if (vspd < 10) {
vspd += grav;
}
if (keyboard_check_released(vk_space)||(gamepad_button_check_released(0,gp_face1)) && vspd <-4) {
vspd = -4;
}
}
One weird thing did happen. I'm thinking that maybe on accident I hit a button on the keyboard that changed something that I can't get a fix on because when I looked at my room window, for some reason many of the sprites, mainly the ground and walls were shifted slightly out of place.
You guys have any ideas about what I could be missing? Something I'm not considering. Thanks!
Here is the jump and ground collision code im using:
//Check For Ground
if (place_meeting(x, y+1, par_wall)) {
//airjump = 1;
vspd = 0;
//Jumping
if (jump_key) {
vspd = -jspd
}
} else {
//Gravity
if (vspd < 10) {
vspd += grav;
}
if (keyboard_check_released(vk_space)||(gamepad_button_check_released(0,gp_face1)) && vspd <-4) {
vspd = -4;
}
}