containing the player inside a scrolling frame
I am changing my level to be a scrolling frame. But now I can't seem to do a check for the window edges to issue a STOP command to my player obj. What is the correct way to do this?
My level is now 19200x480 and my "window" is 640x480. Any help is greatly appreciated. :)
Mobichan
Re: containing the player inside a scrolling frame
I think the "window edge" might actually be the frame edge. You could try placing a pair of invisible active objects that're 16x480 pixels just outside the visible play area, set them not to follow the frame, and test for collisions against them to stop your player.
I think you can do expressions on the current position of the viewable window within the frame as well, so you could do something like {if player presses left and player X < Window X Offset, stop player} {if player presses right and player X > Window X Offset + 640, stop player}
I'm still waiting for my copy to arrive, so I can't offer real code, but I recall being able to do stuff like that in the demo of 1.5.
Re: containing the player inside a scrolling frame
I tried:
If x position of (player)<= X of Left Frame
->Stop
It didn't work, so I am not sure how to proceed.
Re: containing the player inside a scrolling frame
Is this: http://files.filefront.com/Scrolling+Examplemfa/;10079534;/fileinfo.html
what you are talking about?
If you need any help with this just ask me.
Re: containing the player inside a scrolling frame
That is exactly what I was looking for. Thanks so much. :D
I was trying to make an active that was a single pixel bordered box just smaller than the size of the screen filled with a transparency color (so a 630x470 hollow box), set the collision to box (non-fine collision) and test whether the player was NOT overlapping it. Then set the player to "stop." But it didn't work. Any idea why that approach would fail?
And did you mean to delete the first condition in your example? The "Leaves play area" one?
Thanks again,
Mobichan
Re: containing the player inside a scrolling frame
Your welcome, and yea I did mean to delete, I guess I forgot.