Hello again, yes, it’s me, and I have another problem.
See, I’m trying to make my player spawn in x:200, y:200, every time he hits an entity OR he’s y is bigger than the screen’s.
Here’s my code:
if (collide("KoloJedenCzerw", x, y + 1))
{
sprPlayer.play("hidePLAYER");
sprPlayer.x = 200;
sprPlayer.y = 200;
sprPlayer.play("showPLAYER");
}
if (sprPlayer.y >= 600)
{
FP.world.remove(Player(x));
FP.world.add(Player(200, 200));
sprPlayer.play("showPLAYER");
sprPlayer.play("stillPLAYER");
}
And now, you can see that I’ve tried two options here, removing, and changing player’s position by modifying x and y. And nothing is happening. He just jumps and falls in to nothing, disappearing off the screen.
Any advice?