This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
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")
local health
graphics.addDrawFunc("draw()", 0)
function drawHealthBar()
health = math.floor(Values["MC_hp"].Int / 100) * 600
-- + --
function draw() graphics.drawBox(293, 85, health, 40, 0x00ffff, 1) end
end
registerEventHandler("mainLoop","drawHealthBar")
local ragno_hp
graphics.addDrawFunc("draw4()", 0)
function drawRagno_hp()
ragno_hp = (Values["ragno_hp"].Int / 100) * 600
ragno_hp_integer = math.floor(ragno_hp)
-- + --
function draw4() graphics.drawBox(1027, 85, ragno_hp_integer, 40, 0x00ffff, 1) end
end
registerEventHandler("mainLoop","drawRagno_hp")
local health
local fireball_level
function draw()
health = math.floor((Values["MC_hp"].Int / 100) * 600)
fireball_level = math.floor((Values["MC_fireball_level"].Int / 100) * 100)
graphics.drawBox(293, 85, health, 40, 0x00ffff, 1)
graphics.drawBox(1780, 669, fireball_level, 40, 0x00ffff, 1)
end
graphics.addDrawFunc("draw()", 0)removeDrawFunc("draw()")function draw() end -- destructive methodlocal mc_healthThank you!
local ragno_hp
local fireball_level
local fart_level
function draw()
-- + -- -- + -- -- + -- -- + -- -- + -- -- + -- -- + --
mc_health = math.floor((Values["MC_hp"].Int / 100) * 600)
ragno_health = math.floor((Values["ragno_hp"].Int / 100) * 600)
fireball_level = math.floor((Values["MC_fireball_level"].Int / 100) * 100)
fart_level = math.floor((Values["MC_fart_level"].Int / 100) * 100)
-- + -- -- + -- -- + -- -- + -- -- + -- -- + -- -- + --
graphics.drawBox(293, 85, mc_health, 40, 0x00ffff, 1)
graphics.drawBox(1027, 85, ragno_health, 40, 0x00ffff, 1)
graphics.drawBox(1780, 669, fireball_level, 40, 0x00ffff, 1)
graphics.drawBox(1780, 816, fart_level, 10, 0x00ffff, 1)
-- + -- -- + -- -- + -- -- + -- -- + -- -- + -- -- + --
end
graphics.addDrawFunc("draw()", 0)
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.