A
Adam Martinez
Guest
Hello! I'm making one-way platforms. My character can land on top of them from above, and even jump onto them from below, but the character will fall straight down through platforms seemingly when in contact with more than one platform (this happens when my platforms are close together).
I've made progress following this thread...
https://forum.yoyogames.com/index.php?threads/how-would-i-go-about-making-a-one-way-platform.28279/
But I've searched the forum for this particular problem and found nothing.
Here's the code I'm using (inside the player object right now):
var oneway = instance_place(x, y+yspd, obj_platform);
if place_meeting (x, y+yspd, oneway)
&& yspd > 0 {
if bbox_bottom < oneway.y {
while (!place_meeting(x, y+sign(yspd), oneway)) {
y += sign(yspd)
}
yspd = 0
}
}
y += yspd
Any ideas what could be happening? (Thank you!)
I've made progress following this thread...
https://forum.yoyogames.com/index.php?threads/how-would-i-go-about-making-a-one-way-platform.28279/
But I've searched the forum for this particular problem and found nothing.
Here's the code I'm using (inside the player object right now):
var oneway = instance_place(x, y+yspd, obj_platform);
if place_meeting (x, y+yspd, oneway)
&& yspd > 0 {
if bbox_bottom < oneway.y {
while (!place_meeting(x, y+sign(yspd), oneway)) {
y += sign(yspd)
}
yspd = 0
}
}
y += yspd
Any ideas what could be happening? (Thank you!)