This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
local health
graphics.addDrawFunc("draw()", 0)
function drawHealthBar()
health = (Values["MC_health"].Int / 100) * 600
-- + --
function draw() graphics.drawBox(293, 85, health, 40, 0x00ffff, 1) end
end
registerEventHandler("mainLoop", "drawHealthBar")
local fireball_level
graphics.addDrawFunc("draw()", 0)
function drawFireballBar()
fireball_level = (Values["MC_fireball_level"].Int / 100) * 100
-- + --
function draw() graphics.drawBox(1780, 669, fireball_level, 40, 0x00ffff, 1) end
end
registerEventHandler("mainLoop", "drawFireballBar")
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 freegraphics.addDrawFunc("draw2()", 0)first function call, first drawn. Nothing really to do here. If you need to draw it in other orders, you may first calculatte/define all parameters and then use these in a specific function to determine which gets drawn first.Is there a way to determine the "z" position of the drawboxes between interface objects?
The drawBox bar disappears when the character health points go down to 82, 57, 34.Is it because those numbers are incompatible with this equation "health = (Values["MC_health"].Int / 100) * 600"?
graphics.addDrawFunc("draw()", 0)
function drawHealthBar()
health = math.floor(Values["MC_health"].Int / 100) * 600
-- + --
function draw() graphics.drawBox(293, 85, health, 40, 0x00ffff, 1) end
end
registerEventHandler("mainLoop", "drawHealthBar")
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.