jonjons
Member
hello
i wanted the player and enemies to be able to go trough platforms without messing each other up
ive made a way of changing the walkable object based on what ground they are on.
the problem here is that the if and the else leave a gap of 1 step, making the objects sometimes locked inside a wall
in this case if the player/enemie is on top of a passable platform and jumps up if there is a wall on top they will get stuck inside a wall
ive also tried to make the code in only one if to close the gap but gm cant retrieve 2 objects at once
var wallCHK = instance_place(x, y+10, ( obj_wall || obj_Platform );
if ( wallCHK != noone )
{
wallWalk = wallCHK;
}
i wanted the player and enemies to be able to go trough platforms without messing each other up
ive made a way of changing the walkable object based on what ground they are on.
the problem here is that the if and the else leave a gap of 1 step, making the objects sometimes locked inside a wall
Code:
if ( place_meeting(x, y-1, obj_Platform) < place_meeting(x, y+22, obj_Platform ) && platGo == 0 ) // 22
{
wallWalk = instance_place(x, bbox_bottom+5, obj_Platform);
}
else
{
wallWalk = obj_wall;
}
ive also tried to make the code in only one if to close the gap but gm cant retrieve 2 objects at once
var wallCHK = instance_place(x, y+10, ( obj_wall || obj_Platform );
if ( wallCHK != noone )
{
wallWalk = wallCHK;
}