Screen-by-screen scrolling
I've been trying to build an engine for a platform game. So far (yes I know the file is 8way directional and not platform), the game allows for the player to move around a frame and the window "jumps" as they move.
My problem comes in trying to get the player to start in a location OTHER than in the far top left of the game area. So I tried to experiment with Global values thinking that if I had a frame before it with Global values being set to the centre of where I'd like the screen to go, the window would centre on that point where the active object goes. (It's red for the moment, it will be invisible) This is fine when the co-ordinates are the upper left most possible screen, but if I try somewhere else, I'm met with failure.
The player moves to the correct location, but the active object (red) is not found nearby.
Could anyone take a look at this and assist me a little please?
File located here
Frame1: Press Q to move to frame 2, global value A represents the X value of the active2. global value B represents the Y value of active2.
Frame2: What I'd hope would work but doesn't always.
_______________________________Edit:
No worries, I worked it out ^^
I decided to ignore the whole +X in viewing and just to focus upon the Active2 object. SO what I now have is a moving screen engine for a game that can be started at any given point as long as you know the X and Y co-ordinates and configure those in the first frame's Global Values.
There might be easier ways to do this but for now it works. However my next step would be to incorporate saving co-ordinates to a file for save-states.
The result is here if anyone is interested.
finished workload (for this part at least)