Playmaker: Get Lua Field not returning string var

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Playmaker: Get Lua Field not returning string var

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

Re: Playmaker: Get Lua Field not returning string var

Post by Tony Li »

Is there perhaps an errant blank space in the Element or Field? I just tested these actions, and they work:

Image
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Playmaker: Get Lua Field not returning string var

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

Re: Playmaker: Get Lua Field not returning string var

Post 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.
User avatar
Alatriste
Posts: 181
Joined: Wed Nov 11, 2015 5:07 pm
Contact:

Re: Playmaker: Get Lua Field not returning string var

Post by Alatriste »

Not sure what was the problem but I redid the script and now is working. :shock:
User avatar
Tony Li
Posts: 21721
Joined: Thu Jul 18, 2013 1:27 pm

Re: Playmaker: Get Lua Field not returning string var

Post by Tony Li »

Probably a typo somewhere. Glad it's working now.
Post Reply