How to send message to my code?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Passero
Posts: 32
Joined: Thu Jan 18, 2018 1:19 pm

How to send message to my code?

Post 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.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to send message to my code?

Post 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.
Post Reply