I'm working on an infinite runner game and I'm having some troubles. I've been working on it for a while now, and I decided instead of having each of the individual elements of the game (title screen, hi-score menu, actual game, etc.) as their own frame, I'm going to put all of that into one frame and just have the camera slide around to the different parts of the game.
Now, for the actual playable bits: what I did was have the platforms move at a speed of 3 pixels per update (or however else you'd measure the speed). I have a sensor attached to the back of the platforms. I also have a larger sensor in the middle of the play area. When the smaller sensor touches the larger sensor, it creates a new platform of varying size and a new small sensor to attach to that. Every 20 seconds, the platform speed will increase by 1 and the larger sensor gets moved back a little, creating larger gaps to accommodate the faster speed. Eventually the larger sensor moves out of the window when you reach a fast enough speed.
Here's my problem: When I have the level in it's own frame, nothing bad will happen when the larger sensor moves out of the frame. Everything works as it should. However, when I moved everything to the single frame, I started having issues. When the player reaches a speed of 14, the large sensor will move completely out of view. The sensor in the single frame is still in frame, just not in the window itself. The problem is when it's out of the window, it stops functioning. The smaller sensor will touch the larger sensor, but a new platform won't spawn. I set up a counter to add 1 to it every time the two senors touched. When the larger one was out of the window, the counter stopped going up, showing me that there was no collision happening. I went to the properties window and turned "destroy if too far away" off and set "inactive if too far from window" to no, but I'm still not getting platforms. I can't think of a way to fix this. Can anyone help me fix it or prevent it from happening?