Page 1 of 1

Playmaker: Get Lua Field not returning string var

Posted: Thu May 03, 2018 6:20 pm
by Alatriste
Hi,

I'm trying to get the string value I set in the script field of an item, through the playmaker action, but I don't get anything.
The syntaxis I'm using in the script field of the dialogue is: Item["test"].Name = "Text Test"
In the playmaker action, Get Lua Field:
Table:Item_Table
Element:test
Field:Name
StoreStringResult: I created a string variable here.
And every frame is checked.

when I try with the bool, and the syntaxis: Item["test"].Is_Collected = true then it works.

What am I missing?

Re: Playmaker: Get Lua Field not returning string var

Posted: Thu May 03, 2018 8:17 pm
by Tony Li
Is there perhaps an errant blank space in the Element or Field? I just tested these actions, and they work:

Image

Re: Playmaker: Get Lua Field not returning string var

Posted: Fri May 04, 2018 3:32 am
by Alatriste
I'll take a look as soon as I get home. Last time I worked with Lua was nearly 10 years ago and I already forgot the expressions. Which brings me to a question: I couldn't see the expression "Is_Collected" in the manual. Where can I see the expressions supported by Dialogue System?

Thanks!

Re: Playmaker: Get Lua Field not returning string var

Posted: Fri May 04, 2018 8:02 am
by Tony Li
Hi,

With PlayMaker, there's no real need to think about Lua. Just think of them as data tables. So the Item table is like a spreadsheet with a row for each item (Banana, test, etc.), and a column for each field in the item (Name, Is Collected, etc.).

"Is Collected" is a custom field I added for that example screenshot. It's not a built-in field.

Re: Playmaker: Get Lua Field not returning string var

Posted: Fri May 04, 2018 1:31 pm
by Alatriste
Not sure what was the problem but I redid the script and now is working. :shock:

Re: Playmaker: Get Lua Field not returning string var

Posted: Fri May 04, 2018 2:56 pm
by Tony Li
Probably a typo somewhere. Glad it's working now.