Using Quests to Gain Access to Doors
Using Quests to Gain Access to Doors
I would like to use quests to allow doors to open. For instance, I have a trigger that opens a new scene however I only want the trigger to be active only after a quest is complete. Is there a way to do this?
Re: Using Quests to Gain Access to Doors
If your doors have no special visual indicators -- for example, they just have a Dialogue System Trigger set to OnTriggerEnter, and they use the LoadLevel() sequencer command to switch to a new scene -- then configure the Condition > Quest Conditions section to require specific quest state(s).
If it has a visual indicator -- such as a Usable component that can be selected with the player's Selector, or an open door vs. closed door model -- then you'll need to change the component or GameObject when you update the quest. For example, say the player has a quest to bring an access key to the security engineer so she can lower the force field and let your team into the enemy base. The force field is a GameObject that can be active (raised) or inactive (lowered). When the player turns in the quest, use the SetActive() sequencer command:
If it has a visual indicator -- such as a Usable component that can be selected with the player's Selector, or an open door vs. closed door model -- then you'll need to change the component or GameObject when you update the quest. For example, say the player has a quest to bring an access key to the security engineer so she can lower the force field and let your team into the enemy base. The force field is a GameObject that can be active (raised) or inactive (lowered). When the player turns in the quest, use the SetActive() sequencer command:
- Dialogue Text: "Here's the access key."
- Script: SetQuestState("Get Access Key", "success")
- Sequence: SetActive(Force Field, false)
Re: Using Quests to Gain Access to Doors
Thanks. I'll give it a try.