Page 1 of 1

Panel appear after quest is success

Posted: Tue Sep 10, 2019 5:02 am
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.

Re: Panel appear after quest is success

Posted: Tue Sep 10, 2019 10:43 am
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.

Re: Panel appear after quest is success

Posted: Tue Sep 17, 2019 4:49 am
by Mchia_Soo
Would like to ask, is it possible to show the panel without using the script?

Re: Panel appear after quest is success

Posted: Tue Sep 17, 2019 9:00 am
by Tony Li
You can use the Activate GameObject action to activate the panel.

Re: Panel appear after quest is success

Posted: Tue Sep 17, 2019 11:22 am
by Mchia_Soo
Thanks. Both method work fine!

Re: Panel appear after quest is success

Posted: Tue Sep 17, 2019 11:34 am
by Tony Li
Glad to help! :-)