This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
local tShoes = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}
function randomShoes()
if Conditions["cond_no_more_shoes"].ConditionValue == false then
local shoeNum = math.random(1, #(tShoes))
print('shoe index number '..shoeNum..' is called: '..tShoes[shoeNum])
print('max numbers of shoes: '..#(tShoes))
if #(tShoes) <= 1 then
Conditions["cond_no_more_shoes"].ConditionValue = true
print('the shoe seller has nothing left in stock')
end
table.remove(tShoes, shoeNum)
end
end
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Until 1 Dec 2026 all licenses are 30 % off, for example the Indie Bundle for €69.30 instead of €99. The code BLACKFRIDAY is applied automatically at checkout.
See licenses Try it for free--this randomize fabians shoes
tShoes = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}
local cNoShoes = Conditions["cond_no_more_shoes"]
local vShoeCounter = Characters["char_fabian"].Values["count_fabians_shoes"]
function randomShoes()
if cNoShoes.ConditionValue == false then
if #(tShoes) >= 1 then
local shoeNum = math.random(1, #(tShoes))
print('shoe index number '..shoeNum..' is called: '..tShoes[shoeNum])
print('max numbers of shoes: '..#(tShoes))
vShoeCounter.Int = tonumber(tShoes[shoeNum])
table.remove(tShoes, shoeNum)
else
cNoShoes.ConditionValue = true
print('the shoe seller has nothing left in stock')
end
end
end
--clears shoe table before load a savegame
function clearShoeTable()
tShoes = {}
print('the shoe table has '..#(tShoes)..' entries')
end
--play the correct animation when showing scene
function playShoesAnimation()
local numShoes = vShoeCounter.Int
if numShoes <= 42 and cNoShoes.ConditionValue == false then
startAnimation("Scenes[room_03_lounge].Objects[set_fabian_legs].Animations[shoes_"..numShoes.."]")
print('play animation shoes_'..numShoes)
end
end
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.