if game.SpeechLanguage:isEmpty() then
if #(game.CurrentCharacter.CharacterItems) == 0 then
function invEmpty()
--print("the current character contains " .. #game.CurrentCharacter.CharacterItems .. " items in their inventory")
if #(game.CurrentCharacter.CharacterItems) == 0 then
startAction(Actions["no_items"])
end
end
getObject("Conditions[inventory_empty]"):setValue(VConditionValue, true)
I'm getting the following error in messages.logYes, it means it's probably not finding a condition or value. Maybe duplication issue or searching for a condition or value that no longer exists. Check out the new script/method I just shared with you in my post above.13:55:37: Error: Unknown data-field "alue".don't know if that's related?
What version of Visonaire are you using? You can try changie the .Value to .ConditionValue after the Conditions["inventory_empty"]You should always use .ConditionValue when accessing/editing conditions with Lua script.You could also try the old method likegetObject("Conditions[inventory_empty]"):setValue(VConditionValue, true)
You should always use .ConditionValue when accessing/editing conditions with Lua script.
Because other data structure fields contain the word Value in them so it could confuse the engine. Shorthand is very hit & miss at times. Don't forget that we have .ValueString & .ValueInt, but we only use .Int & .String to access/edit those, but condition field is .ConditionValue for some reason rather than ValueCondition. Ideally it would have been nice if we could just use .Int, .Str, .Cond - which is something Simon could probably sort out, but the data structure is already confusing enough as it is due to the multiple methods available of accessing & editing the data.You should always use .ConditionValue when accessing/editing conditions with Lua script.Why? The condition holds only true/false information, no? Nothing else.