This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
if-conditionA true
actionA
endif.
if-conditionB true
actionB
endif.
if-conditionC true
actionC
endif.
startAnimation("Game.GameCurrentCharacter.CharacterCurrentOutfit.OutfitCharacterAnimations[animation_name]") -- replace "animation_name" with name of animation you want to play
Hmm when you use that method it can cause issues because it's reading the code line by line & thus if you change the condition inside of the first query it can end up triggering the code in the other query because that condition is now met. It does not act as if else when you sting queries together in that manner.
if getObject("Conditions[ConditionA]"):getBool(VConditionValue) then
startAction("Actions[ActionA]")
elseif getObject("Conditions[ConditionB]"):getBool(VConditionValue) then
startAction("Actions[ActionB]")
elseif getObject("Conditions[ConditionC]"):getBool(VConditionValue) then
startAction("Actions[ActionC]")
elseif getObject("Conditions[ConditionD]"):getBool(VConditionValue) then
startAction("Actions[ActionD]")
end
function checkCond(c)
return getObject("Conditions[" .. c .. "]"):getBool(VConditionValue)
end
if checkCond("ConditionA") then startAction("Actions[ActionA]")
elseif checkCond("ConditionB") then startAction("Actions[ActionB]")
elseif checkCond("ConditionC") then startAction("Actions[ActionC]")
elseif checkCond("ConditionD") then startAction("Actions[ActionD]")
end
if not checkCond("condition_name") then -- NOT allows us to check if condition is false instead of writing == false.
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.