I'm working on a maze game where you have to follow a "leader" through a complex series of turns and crossroads. I've got my Leader set up with Path Movement, moving on a path through the maze, and my Player has 8-direction movement - the Leader and Player seem to be working well.
Here's the part that's hurting my brain:
I want the Player to be Destroyed if they make a wrong turn, and I don't know how to do that.
The Leader path crosses over itself and re-travels the same path in some places, so I can't just use collision walls to trigger the Destroy because the paths can't be permanently blocked.
Basically, you have to follow the exact path that the Leader goes, in sequence.
So if you're on a grid, and the leader goes up 2 spaces, then right 6 spaces, then down 3 spaces, then left 3 spaces...
and the Player goes up 2 spaces, then right 6 spaces...but MISSES the down turn (either fails to make the turn at that intersection or turns the wrong way) - DEATH!!!! and Restart!
Does that make sense?
Anyone have any ideas for how to accomplish this?
The second tricky part:
I'd also like the Player to be able to turn off the path in certain places to grab Bonus tokens. The tokens would be on"offshoot" dead-end paths that the Leader never goes down, but that the Player can quickly zip into, grab the token, then get back to following the Leader. In that case, when the Player takes a turn that is not on the Leader's route, I DON'T want to Destroy the Player. So maybe I can designate those Bonus Offshoot areas as "safe" somehow?
I plan on making each level a new maze with a new path to follow and jump to the next frame when you reach the end, so it only has to run through the path sequence once per frame.
PS: I'm a noob, just starting to get the hang of fusion 2.5 - never really coded before, but I'm learning!
Any ideas, examples, etc. for how to do this stuff would be much appreciated!