Hi everyone! I'm having a lot of fun learning how to use GE! I have a question I was hoping someone would be able to answer.
When the main actor collides with a bomb, I needed to start the level over and change some variables (e.g., move the main actor back to starting position, reduce the number of lives by one, clear all enemies from the field of play, etc.).
To accomplish this, when the actor collides with a bomb, the main actor is moved to an offscreen area (a wire-framed region) where all the variables are changed appropriately, the main actor is moved back into starting position, the current level is displayed, etc. This offscreen area is above the main field of play but is in the same activation region.
This works perfectly if the main actor collides with a bomb that is located in the top half of the screen (closest to the offscreen area), but it doesn't work if the main actor hits a bomb in the lower right portion of the screen. The code is identical for both bombs, and I cannot figure out why it works for collisions with some bombs and not others.
I have tried everything I can think of, including:
--making another off-screen region below the main field of play and sending the main actor to it if the main actor collides with a bomb on the lower half of the screen;
--tweaking some timers to make sure that the actor has enough time to reach the offscreen area (which is farther away from bombs on the bottom half of the screen than it is for bombs on the top half);
--Moving the offscreen area to different positions around the main field of play.
I can't think of what to do next! If anyone has any general ideas about what can cause identical code to sometimes produce different results, I would greatly appreciate it! And if anyone has any more specific ideas on how to fix this problem, I would also greatly appreciate it.
Thanks for the help in advance!