Page 1 of 1

What parameters to send in 'Send Messages'?

Posted: Thu Mar 10, 2016 12:37 am
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

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

Posted: Thu Mar 10, 2016 7:05 am
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.)

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

Posted: Fri Mar 11, 2016 12:18 am
by arctel
That did the trick, thank you!