Start Quest on Event

Announcements, support questions, and discussion for Quest Machine.
Post Reply
ANoobOnVR
Posts: 1
Joined: Fri Mar 25, 2022 2:28 am

Start Quest on Event

Post by ANoobOnVR »

Hello,

I am developing a game in VR and don't want to use quest giver function. How do I change quest "Current status" from Inactive to Active using unity events?

I cant seem to get it working.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Start Quest on Event

Post by Tony Li »

Hi,

You can wrap the code in this article into a method, and then call that method from your UnityEvent.

Alternatively, if you don't want to do any scripting, let's say you have an enemy with an OnDeath() UnityEvent, and you want to give a quest when this UnityEvent is called. Add a Quest Giver component to the enemy, and add the quest to its Quests list. Configure OnDeath() to call QuestGiver.GiveAllQuestsToQuester. You can choose to give it to the player by assigning the player's GameObject or by the ID string assigned to the player's Quest Journal.
Post Reply