DialogueLua.GetActorField giving wrong value
-
- Posts: 2
- Joined: Tue Apr 04, 2023 10:03 am
DialogueLua.GetActorField giving wrong value
Hello, the GetActorField method keeps giving me the value of a field as empty even though in the database has a value. At first I thought I was giving the field name wrong but after debugging I found out that the Actor Lua table actually had the value as null. Why does this happen?
Re: DialogueLua.GetActorField giving wrong value
Hi,
What's the C# code you're using?
Please temporarily add a Lua Console to your scene. Then play the scene and press ~+L to open the Lua Console. Enter:
where "name" is the name of the actor, replacing spaces and punctuation with underscores (e.g., Actor["Private_Hart"]).
Does it show the field you're looking for?
What's the C# code you're using?
Please temporarily add a Lua Console to your scene. Then play the scene and press ~+L to open the Lua Console. Enter:
Code: Select all
return Actor["name"]
Does it show the field you're looking for?
-
- Posts: 2
- Joined: Tue Apr 04, 2023 10:03 am
Re: DialogueLua.GetActorField giving wrong value
Thanks for the reply, the lua console doesn't show me the value but the field name is right.
"ImageName = null" is what is giving me and it should give me "signature" instead.
The C# code I'm using is:
"ImageName = null" is what is giving me and it should give me "signature" instead.
The C# code I'm using is:
Code: Select all
DialogueLua.GetActorField("Character", "ImageName").AsString
Re: DialogueLua.GetActorField giving wrong value
If the Lua Console doesn’t show the value, then it’s not there. I think the first step is to get it to show in the Lua Console. How are you setting the value? In the dialogue database? Via DialogueLua.SetActorField?