Panel appear after quest is success

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Panel appear after quest is success

Post by Mchia_Soo »

Hey Tony!

I want to display the panels of complete level and game over after the success node and failed node.

Wanna display it through scripts. But I couldn't found any tutorial on it.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Panel appear after quest is success

Post by Tony Li »

Hi,

I'll suggest two ways to do it. If you don't like either of these ways, we can look at other ways.

1. Write a custom quest action. Copy the file Quest Machine / Templates / QuestActionTemplate.cs. It has comments that explain how to customize it. Customize it to show the level complete or game over panel. Then add the action to the Successful and Failed actions lists.

2. Or, use the message system. Quest Machine sends the message "Quest State Changed" when a quest state changes. You can listen for this message. Look at QuestJournal.cs for an example of how to listen for the message.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Panel appear after quest is success

Post by Mchia_Soo »

Would like to ask, is it possible to show the panel without using the script?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Panel appear after quest is success

Post by Tony Li »

You can use the Activate GameObject action to activate the panel.
Mchia_Soo
Posts: 72
Joined: Sun Jun 30, 2019 11:59 pm

Re: Panel appear after quest is success

Post by Mchia_Soo »

Thanks. Both method work fine!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Panel appear after quest is success

Post by Tony Li »

Glad to help! :-)
Post Reply