This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
if game.SpeechLanguage:isEmpty() thenif #(game.CurrentCharacter.CharacterItems) == 0 thenfunction invEmpty()
--print("the current character contains " .. #game.CurrentCharacter.CharacterItems .. " items in their inventory")
if #(game.CurrentCharacter.CharacterItems) == 0 then
startAction(Actions["no_items"])
end
endgetObject("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.
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.