Hi Tony!
Working on a huge narrative game, I want to create custom articy node with default script for differents actions. (Quest status update for example).
So I've created an Articy Template who contain a script field, a slot and a quest state dorp-down.
Is it possible to execute my script when my node is reached ?
Articy Custom Script property
Re: Articy Custom Script property
Hi - Yes, but two notes:
1. The Dialogue System uses Lua, not articy:expresso. Enter Lua code in the field, such as:
In Unity, you can add a script that has an OnConversationLine method to the Dialogue Manager GameObject. The method can look up the field and run it through Lua:
2. You may find it easier to simply put the Lua code in the output pins of articy nodes (e.g., dialogue fragment nodes). Articy will say that it's not valid articy:expresso, but the Dialogue System will happily run it through Lua.
1. The Dialogue System uses Lua, not articy:expresso. Enter Lua code in the field, such as:
Code: Select all
SetQuestState("MyQuest", active);
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
string script = Field.LookupValue(subtitle.dialogueEntry.fields, "MediumScriptValue");
if (!string.IsNullOrEmpty(script))
{
Lua.Run(script);
}
}
Re: Articy Custom Script property
Thanks, it helps a lot!
Re: Articy Custom Script property
Glad to help!