Forum rules - please read before posting.

Cutscenes and Player Switching Question

I have a scene with an On Start Cutscene that draws the player into conversation. It ends by Scene Switching (and player switching to a blank player) for a tutorial.

After this tutorial, I change a global variable to has_done_tutorial = true and call Player Switch to return to the first scene (not Scene: Switch).

However, I want the previous conversation to continue seamlessly, so I've tried two things to no avail:

  • On Var Change cutscene (thinking it would play because I changed a global variable)

  • On Start Cutscene with the first Action being a Variable: Check with the initial cutscene mentioned above as the false condition and the continuation as true.

Neither of these solutions are working. Can anyone explain how On Var Change cutscenes are supposed to work? I'm missing something.

And also, is the On Start Cutscene not triggered the second time because I did Player: Switch instead of Scene: Switch?

Thanks for any insight!

Comments

  • OnVarChange cutscenes will only trigger when a variable is changed in the scene - not after switching from another in which the variable was changed. They should be phased out in all honesty - as their function is best suited to custom events.

    In this case, the OnLoad cutscene is what you need. OnStart vs OnLoad can be a little tricky when it comes to player-switching, but essentially: OnLoad will be called if you're switching to a player that has already been controlled (and thus has data that's being loaded). OnStart will be called if you're switching to a new player for the first time (and so has no such data to load).

    To prevent this cutscene from triggering when loading the scene at any other time, best to rely instead on a PopUp variable - not a Boolean - so that you can have three states: "Not done tutorial", "Just done tutorial", "Tutorial over" (OWTTE).

    When you currently set the Bool to True, instead set it to "Just done tutorial", and check for this when loading the original scene. Once that cutscene's complete, set it to "Tutorial over" so that re-loading the scene doesn't re-run this cutscene.

  • Brilliant, as always, and thanks for the clear explanation. Man, AC is the best B) Works perfectly, and good to know about Pop Up variables for states.

  • No problem. Asset reviews are welcome

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.