Open door by completing all puzzles
I have a script that I'm using that allows the player to drag a gameobject to a glowbox, causing it to snap into place. It's set up to destroy the object the player is holding, and activate a hidden object to give the illusion that the item in the player's hand has snapped into place. The thing that I want to do is to write a script that activates a nearby door after all of the hidden objects have been set active in the hierarchy.
Answer by eses · Aug 22, 2018 at 08:45 AM
@elcamp3
There are many ways you could set this up.
Create a method somewhere in your puzzle scripts(s).
Each time some part of puzzle is solved, set some bool for it to true.
When all the puzzles are solved call a method that opens/activates the door.
Also, if you google for unity open door on button press, you'll come up with many helpful links.
Your answer
Follow this Question
Related Questions
Disable 2 Scripts during Countdown 1 Answer
Why are my keys being registered multiple times? 1 Answer
How can I temporary increase the size of an object? 2 Answers
Having trouble moving a GameObject to another scene and Transform it to a different position 0 Answers
Disable and enable emission property of a material via C# script? 0 Answers