Page 1 of 1

Passing a dialogue Variable in the script field

Posted: Wed Mar 06, 2024 8:19 am
by Timeslip
Hi Tony,

Getting a "Code has Syntax error" error, when trying to pass a number try variable from the database to a method. Can you tell me what I'm missing? Thanks!
ScriptField.png
ScriptField.png (2.72 KiB) Viewed 167 times

Re: Passing a dialogue Variable in the script field

Posted: Wed Mar 06, 2024 8:30 am
by Tony Li
Hi,

Use [var=variablename] in text and sequences, but use Variable["variablename"] in Lua code such as Script and Conditions fields:

Code: Select all

StartMoveMapCharacterCoroutine(7, 0, 16, Variable["TempCharacterID"], 0)

Re: Passing a dialogue Variable in the script field

Posted: Wed Mar 06, 2024 11:07 am
by Timeslip
Thank you!

Re: Passing a dialogue Variable in the script field

Posted: Wed Mar 06, 2024 11:55 am
by Tony Li
Glad to help!