Basic Syntax Help
Posted: Fri Dec 23, 2016 2:59 am
Hi,
I'm trying to do some basic stuff, but I can't figure out the syntax. It would be great if we could have all the lua/dialog examples in one place. I've been looking at the docs and examples for hours but I can't figure out some stuff like:
For example, I have a Monster which is an actor. I added the Fields HP and AttackDmg.
I'd like to do something like
"You are fighting a [var=Conversant] It has an attack of [lua(Variable['Conversant.AttackDmg'])]."
But that code is returning a nil.
What am I missing here? How do we access fields within a variable?
Also, is there a way to dynamically assign Actors/Conversants in Code? Like I have a fight conversation- I want the same conversation to be used across multiple 'monsters' which are Actors. It would be great if I could pull the current conversation node in a sequence and change the actor values on the fly.
I'm trying to do some basic stuff, but I can't figure out the syntax. It would be great if we could have all the lua/dialog examples in one place. I've been looking at the docs and examples for hours but I can't figure out some stuff like:
For example, I have a Monster which is an actor. I added the Fields HP and AttackDmg.
I'd like to do something like
"You are fighting a [var=Conversant] It has an attack of [lua(Variable['Conversant.AttackDmg'])]."
But that code is returning a nil.
What am I missing here? How do we access fields within a variable?
Also, is there a way to dynamically assign Actors/Conversants in Code? Like I have a fight conversation- I want the same conversation to be used across multiple 'monsters' which are Actors. It would be great if I could pull the current conversation node in a sequence and change the actor values on the fly.