Page 1 of 1

How to send message to my code?

Posted: Mon Sep 30, 2019 11:06 am
by Passero
I have my own custom inventory system and other parts as well.
Sometimes when a quest finishes, I need to remove items from my inventory, or give items.

Therefore, I would like to send a message when a quest is finished and pass maybe a string and number so I know what item to remove/give.

Re: How to send message to my code?

Posted: Mon Sep 30, 2019 11:16 am
by Tony Li
Hi,

There are several ways to do this. The most nicely integrated is to write a custom quest action, which is relatively easy to do. There is a starter template script in Plugins / Pixel Crushers / Quest Machine / Templates. Copy QuestActionTemplate.cs and fill in your code where the comments indicate. Then your action will appear in the actions dropdown when editing a quest.