Regarding game state within a scene
Hey!
So in my game, at the beginning of a scene, there's a knock at the door. When the player answers it, it triggers a short bit of dialogue, sort of like a cut scene. Of course, after that happens the first time, I don't want that cut scene to trigger again every time the door is opened. How can I ensure the game knows the initial cut scene has already occurred?
Is this just a matter of creating a public bool variable on the door? Like a "hasBeenOpened" that changes to true after the cut scene triggers? Or is it more a Game Manager-type object activates the cut scene in the same way? Am I overthinking this?
I feel like it's a pretty simple problem, but anything I look up about game state is more about ensuring information transfers between scenes and not within a scene.
Any help would be greatly appreciated! Thank you!
Your answer
Follow this Question
Related Questions
OnTrigerEnter not working 2 Answers
I have a specific problem with my trigger 0 Answers
Trigger not detected 0 Answers
Collider trigger two times, even if it's not active. 1 Answer
OnTriggerEnter2D being called 25 times. 0 Answers