D
Den
Guest
My player object just will not move on the Y-axis even if my vspd variable is increasing or decreasing, I have tried some debugging to figure out whats causing it, I have looked through all the code the player object is using and still cant see what's stopping it from moving along the Y-axis.
I hope someone could help coz I just cant see the issue here (Hopefully it's something obvious)
Here's the players step:
The players movement script:
It isn't collisions causing it coz I have turned it off and checked.
That's all the code running through the player when just moving around, Is there something i'm not seeing or what lol?
I hope someone could help coz I just cant see the issue here (Hopefully it's something obvious)
Here's the players step:
Code:
///Initiate The Players Step
//Current form check logic
if(!instance_exists(obj_player_soul)){
player_input();
cam_on_us = true;
view_visible[0] = true;
} else if(instance_exists(obj_player_soul)) {
state = soul_form_state;
}
script_execute(state);
//Switch to soul form
if(OB_key) && (state != soul_form_state){
soul_form = instance_create(x,y-45,obj_player_soul);
}
//Open && shut doors
if(position_meeting(mouse_x,mouse_y,obj_door) && (interact)) {
switch(obj_door.image_index)
{
case 0: if(image_index = 0) image_index = 1;
break
case 1: if(image_index = 1) image_index = 0;
break;
}
}
Code:
///move_state_normal
//Apply gravity
if(!place_meeting(x,y+1,obj_solid)) {
vspd += grav;
}else {
vspd = 0;
}
//Left & Right code
if(right_key || left_key) {
hspd += (right_key-left_key);
hspd_dir = right_key - left_key;
//Limit the speed
if(hspd > spd) hspd = spd;
if(hspd < -spd) hspd = -spd;
}else {
hspd = 0;
}
//Flip the sprite
if(hspd != 0) {
image_xscale = sign(hspd);
}
collisions();
That's all the code running through the player when just moving around, Is there something i'm not seeing or what lol?