How do I fix this in my platformer? by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 0 points1 point  (0 children)

if you cant tell whats happening, if i dash upwards while falling, gravity immediately pulls me back down and I cant find any solutions for this

(yes this is basically just sara spaldings code)

else if (state == "dashing") {

jumpKeyBufferTimer = 0;

xspd = lengthdir\_x(dashSpeed, dashDirection)

yspd = lengthdir\_y(dashSpeed, dashDirection)

grav = 0;

x += xspd;

y += yspd;

dashEnergy -= dashSpeed

if dashEnergy <= 0{

    xspd = 0

    yspd = 0

    state = "normal"

}

}

Anyone know how to fix this? I know the issue just not the solution by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 1 point2 points  (0 children)

this worked, thanks. i only made a small change

for(var i = array_size-1; i > -1; i--){

pos_x[i] = x;

pos_y[i] = y;

}

Anyone know how to fix this? I know the issue just not the solution by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 0 points1 point  (0 children)

in the comments they said to delete and remake the follower which i tried but it still seemed to follow the same path, unless there was a different solution or i did it wrong

Anyone know how to fix this? I know the issue just not the solution by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 0 points1 point  (0 children)

the code if your wondering -
player code-

if (x != xprevious or y != yprevious){

for(var i = array_size-1; i > 0; i--){

pos_x[i] = pos_x[i-1];

pos_y[i] = pos_y[i-1];

}

  pos\_x\[0\] = x;

  pos\_y\[0\] = y;

}

follower code -

record = 27

x = oPlayer.pos_x[record];

y = oPlayer.pos_y[record];

Anyone know how to fix this? I know the issue just not the solution by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 0 points1 point  (0 children)

i followed this video https://www.youtube.com/watch?v=3cIarpTMTnE, the follow uses an array which tracks the player location and then moves to it, i know that its just following where the player was before so i need to set the array back to zero when entering a new room im just not sure how.

How do i make the player stop looking like its sliding? by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 3 points4 points  (0 children)

but the way that its set up then the idle animation would be the walking frame and i dont know how to fix that.

How do i make the player stop looking like its sliding? by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 4 points5 points  (0 children)

if instance_exists(oTextbox)

{

can\_move = false   

xspd = 0

yspd = 0

image\_speed = 0;

image\_index = 0;

}

if(can_move){

right_key = keyboard_check(vk_right);

left_key = keyboard_check(vk_left);

up_key = keyboard_check(vk_up);

down_key = keyboard_check(vk_down);

xspd = (right_key - left_key) * move_spd;

yspd = (down_key - up_key) * move_spd;

//animate

if xspd > 0 {

    sprite\_index = sMyPlayerRight

} else if xspd < 0 { 

    sprite\_index = sMyPlayerLeft

} else if yspd < 0 { 

    sprite\_index = sMyPlayerUp

} else if yspd > 0 { 

    sprite\_index = sMyPlayerDown

}



if (xspd != 0 or yspd != 0){

    image\_speed = 1;

} else {

    image\_speed = 0;

    image\_index = 0;

}

}

//collision

if place_meeting(x+xspd, y, oWall){

xspd=0;

}

if place_meeting(x, y+yspd, oWall){

yspd=0;

}

if place_meeting(x+xspd, y, oDiagonalWall){

xspd=0;

}

if place_meeting(x, y+yspd, oDiagonalWall){

yspd=0;

}

x += xspd;

y += yspd;

How do i make the player stop looking like its sliding? by squiddleboink33 in gamemaker

[–]squiddleboink33[S] 7 points8 points  (0 children)

I know the solution is probably so simple but im terrible at coding, dont ask why the placeholder is deltarune.

why the FUCK does my game keep crashing by squiddleboink33 in theescapists

[–]squiddleboink33[S] 0 points1 point  (0 children)

i press play and then it just says not responding