D
DarkzFlame
Guest
I've been working on jumpthrough slopes and I got it mostly working, the only issue I've now is that while I'm moving on a jumpthrough platform and the player moves through the jumpthrough slope the player gets stuck horizontally, the player will still be able to jump out of it though.
Here is a gif demonstrating the bug:
Here is the code I've got so far:
I've also tried to do this:
But then the player will keep it's momentum moving through the jumpthrough slopes.
Also it might be worth mentioning that the code I'm using is from Zack Bell's "Action Platformer Engine 1"
I know your not supossed to share code from Market Place assets, but Zack Bell posted pretty much the same code here for the slope movement.
Here is a gif demonstrating the bug:
Here is the code I've got so far:
Code:
repeat(abs(vx)) {
if (place_meeting(x + sign(vx), y, oParSolid) && !place_meeting(x + sign(vx), y - 1, oParSolid))
y -= 1;
if (place_meeting(x + sign(vx), y + 2, oParSolid) && !place_meeting(x + sign(vx), y + 1, oParSolid))
y += 1;
if (!place_meeting(x, y, oParJumpThru)){
if (place_meeting(x + sign(vx), y, oParJumpThru) && !place_meeting(x + sign(vx), y - 1, oParJumpThru))
y -= 1;
if (place_meeting(x + sign(vx), y + 2, oParJumpThru) && !place_meeting(x + sign(vx), y + 1, oParJumpThru))
y += 1;
if (place_meeting(x + sign(vx), y, oParJumpThru) )
vx = 0;
}
if (place_meeting(x + sign(vx), y, oParSolid))
vx = 0;
x += sign(vx);
}
Code:
if (!place_meeting(x, y+1, oParJumpThru)){
if (place_meeting(x + sign(vx), y, oParJumpThru) )
vx = 0;
}
Also it might be worth mentioning that the code I'm using is from Zack Bell's "Action Platformer Engine 1"
I know your not supossed to share code from Market Place assets, but Zack Bell posted pretty much the same code here for the slope movement.