I have teleporters in my platformer game. I can make the player fade out when he touches the first teleporter and fade back in when it teleports to the second teleporter. But, when the player reaches the second teleporter, his built-in platformer movements stop working. I can not make him move at all. If I hit the left and right arrow keys, he just faces the opposite direction. No jumping, no walking, nothing. I’ve attached my code. Does anybody see anything that might be causing the problem? Thanks
Try to add trigger once to the event that changes the position of the player.
Didn’t work. Player still won’t move. The teleporters have platform behaviors on them.
Are you sure the position you give is not inside the platform, don’t hesitate to make it a bit above the ground if you’re not sure
At first, I was using the teleport2.X() and teleport2.Y() for the landing position. I thought the same thing. That is why I have those numbers in the player position, but that didn’t work either. Here is a screenshot of the player on the landing teleporter. He seems far enough away from the other platforms. When I position the player, I have him just above the second teleporter and he falls down onto it. I tried having the player spawn in mid-air and fall onto the gray metal looking platforms. He gets stuck on those ones too.
Have you seen any error in the console? Ctrl-Shift-I to open it. Open it in-game while you cannot move
I added a collision with teleporter2 condition and a simulate jumping action. The player will simulate a jump. I tried the other simulation keys and the player will do all of them. But I still can’t move him using the arrow keys or space bar when I am on the teleporter. Player works fine everywhere else…
That is indeed very weird. I can only propose you to disable default controls and create your owns at this point.
I finally got it working. I had to add an Ignore Default Controls set to NO. Then the player starting working correctly after using the teleporter. I also got rid of the timers and now control the fade in and fade out using variables. This is a lot cleaner and easier. I attached a screenshot of the code if anyone else needs to use it. Thanks again.
Solved