I have another thread going on but its about a totally different problem. If the Mods have a problem with me making a new one, please merge this with my other thread.
Well, I know how to do checkpoints. Each time Sonic hits one, it stores his x and y position in global variables. Now,
Suppose the level is like this:
..*.......|.................|.............. .......... .............................................|................................[/CODE] The |'s are Checkpoints. The ...'s make up the ground. Sonic is the *. Going from Left to right on the first row are Checkpoints 1 and 2. On the second row is Checkpoint 3. [u]Scenario #1[/u] Suppose Sonic jumps over Checkpoint 1 and gets checkpoint 2. Then he dies. Starting at 2, Sonic goes backwards to Checkpoint 1. [b] How do I make sure that this checkpoint is already "on" and he cannot get it because he has "passed" it?[/b] [u]Scenario #2[/u] Sonic Starts and goes to the left to fall to the second row. Sonic goes right and gets Checkpoint 3. Sonic somehow dies. [b] How do I make sure that Checkpoint 1 and 2 are already "on" and he cannot be gotten because he has "passed" them?[/b] If I solved Scenario #1 by making a statement such as, "If Sonic's X value is greater than the X value of a Checkpoint, turn the checkpoint on", it wouldn't work for Scenario #2, as Checkpoint 2's X value is greater than Checkpoint 3's. Thanks! I'd appreciate help!