Working through my first "game" and things were going smoothly until today when I tried to introduce a second Layout AND timelines into the mix. My experience with programming (and Construct) is limited so I'm wondering if there's something obvious I'm missing here.
- > When player gets certain # of points, they can access a new "door"
- > When they enter the "door" (on collision), they are brought to a new layout (Layout 2).
- > On start of this layout, the player views a short animation (timeline begins on start of layout, player cannot access any controls), screen fades to black, and they are brought back to the title screen
Steps 1 and 2 are working as far as I can tell. But:
1) There have been a few instances where I'm seeing different behavior when starting Layout 2 from preview vs. entering from Layout 1.
For example, if I use the event sheet below (gameover.png), the whole sequence plays properly when I start the layout with preview. If I play the game and enter from Layout 1, the "Go to StartScreen" fires off about 3 seconds into the timeline. This seems odd because Layout 2 has its own event sheet and there is no inherited code between the two (since it's all animation).
2) Events based on timeline triggers are behaving differently depending on the trigger, but I don't know why.
I thought maybe I wasn't being specific enough with my timeline event, so I set it to fire off the transition + gameover functions after the timeline is "finished." If I try the below (gameoveralt.png), I can get all the way to the end of the animation in Layout 2 preview mode AND when entering from Layout 1, BUT now the fade in doesn't work properly.
I've tried a few other things and they're all ALMOST there but something goes awry. Even if I manage to blunder my way into a solution, I'd love to know if there's a bigger picture thing I'm missing here about layout transitions, timelines, or life in general. And, happy to share CAPX if it's helpful.
Thanks in advance.