What parameters to send in 'Send Messages'?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
arctel
Posts: 4
Joined: Wed Feb 10, 2016 5:06 pm

What parameters to send in 'Send Messages'?

Post by arctel »

Hi,

I'm trying to send a basic int parameter within the Quest Trigger -> Send Messages.

If the basic message is the function 'test_function' (which works by itself without parameters).

Inputting the parameter of '7' for example gives an error, have tried 'int 7', using the message 'test_function(7)', and nothing has seemed to do the trick.

What am I missing?

Thanks,
Christian
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: What parameters to send in 'Send Messages'?

Post by Tony Li »

Hi,

Quest Trigger -> Send Messages provides a very basic SendMessage functionality that only sends a string value. You can use this:

Code: Select all

void test_function(string data) {
    int myInt = Tools.StringToInt(data);
}
(The Tools class is in the PixelCrushers.DialogueSystem namespace, so include "using PixelCrushers.DialogueSystem;" at the top of your script.)
arctel
Posts: 4
Joined: Wed Feb 10, 2016 5:06 pm

Re: What parameters to send in 'Send Messages'?

Post by arctel »

That did the trick, thank you!
Post Reply