Unlocking an area after quest is completed.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Robbie_NI
Posts: 3
Joined: Tue Feb 27, 2018 5:03 am

Unlocking an area after quest is completed.

Post by Robbie_NI »

Hey there,

I'm curious if there is a way of unlocking a specific portions of the level after a dialogue or quest has been completed?

I had thought about maybe having an object block the player's path and then once the quest or dialogue was completed this object would be removed (basically the inverse of the SetActive() command - except I'm not sure if there is a SetInactive() or Disable() commands?) excuse me if I'm being dumb and there actually is!

Any help would be appreciated!

Thanks.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Unlocking an area after quest is completed.

Post by Tony Li »

Hi,

You can use the SetActive() command. The optional second parameter specifies whether to activate or deactivate the GameObject. If you omit the second parameter, it tries to activate the GameObject. If the GameObject is inactive and you want to activate it, its root parent must be active.

Alternatively, you could use the AnimatorPlay() command to play some animation that opens the area, such as a door sliding open.
Post Reply