I guessing you want to have your character controlled with the arrow keys and stop when hitting the cliff. There are many ways.
If the left/right keys rotate the char, and up moves it, say, 5 steps, then add this to this to the movement script:
If (touching "cliff")
Move -5 steps
What I recommend you do for that R.P.G is to create the ground as part of the background costumes, and then create a collision map sprite, I guess, with impassable spots filled in to their corresponding parts in the background. Hide this sprite. The script is basically the same. It could save you from having a lot of sprites.
Hope I helped
Offline
It completely depends on your movement scripts.
If you have one where it turns around and moves, you could have an is touching obstacle move -## steps.
If you have something different maybe you could keep a LastSafeX and LastSafeY variable that is constantly setting to X and Y if not touching obstacles, and then the X and Y are set back to it if touching obstacles
Last edited by colorfusion (2011-02-12 05:14:47)
Offline