I made a platform game. WHen I run the game, I noticed that I can walk my player right out of the frame and into nowhere! So I made an event reading: "So-and-So" (the Player Character) leaves play area= "So-and-So"-movement-bounce.
This worked, except for one thing. If my character jumped diagonly at the edge of the frame, he could still leave the frame? How is this, and how can I fix it?
you could put a backdrop wall around the outside of the play area
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
Make a fake game border thing. Just put some long pure black wall thingies at the side and set them as backdrops.
If you don't want your screen to see them (i.e. you use a full-screen res), just add an extra few events that don't let the screen go less or more than a certain X/Y amount.
It adds 4 new objects to your game and about 4 more events, but it's worth it .
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Just put obstacle backdrops at the edges of the frame and in the properties of the frame under "frame" in the properties tree tick "handle background collisions even out of window". That works, trust me.
Or if you dont want to mess up the frame editor with lots of backdrops just do the thing suggested before:
[X position of [player]] < 0:
* set [X position of [player]] to 0
[X position of [player]] > Frame Width:
* set [X position of [player]] to Frame Width
[Y position of [player]] > Frame Height:
* set [Y position of [player]] to Frame Height