This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.Black Friday: the Indie Bundle is 30 % off until 1 Dec 2026, €69.30 instead of €99. The code BLACKFRIDAY is already applied.
Get 15 % off Try it for free-- * variables * --
local pos, scn -- empty variable (will be used to store current characters position)
-- * function that will be used to update shadows position * --
function updateShadowPos()
scn = game:getLink(VGameCurrentScene):getName()
-- + --
if scn == getObject("Game.GameCurrentCharacter.CharacterScene"):getName() and scn == getObject("Characters[hero_shadow].CharacterScene"):getName() then
pos = getObject("Game.GameCurrentCharacter"):getPoint(VCharacterPosition)
-- + --
getObject("Characters[hero_shadow]"):setValue(VCharacterPosition, { x = pos.x, y = (pos.y - 10) })
end
end
registerEventHandler("mainLoop", "updateShadowPos") -- create loop event
-- * variables * --
local pos, scn -- empty variable (will be used to store current characters position)
-- * function that will be used to update shadows position * --
function updateShadowPos()
scn = game:getLink(VGameCurrentScene):getName()
-- + check & update shadow scene + --
if getObject("Characters[hero_shadow].CharacterScene"):getName() ~= getObject("Game.GameCurrentCharacter.CharacterScene"):getName() then
getObject("Characters[hero_shadow]"):setValue(VCharacterScene, getObject("Game.GameCurrentCharacter.CharacterScene"))
end
-- + update shadow position + --
if scn == getObject("Game.GameCurrentCharacter.CharacterScene"):getName() and scn == getObject("Characters[hero_shadow].CharacterScene"):getName() then
pos = getObject("Game.GameCurrentCharacter"):getPoint(VCharacterPosition)
-- + --
getObject("Characters[hero_shadow]"):setValue(VCharacterPosition, { x = pos.x, y = (pos.y - 10) })
end
end
registerEventHandler("mainLoop", "updateShadowPos") -- create loop event
-- * variables * --
local pos, scn -- empty variables
local shdw = "hero_shadow" -- add the initial shadow character's name here
-- * function that will be used to update shadows position * --
function updateShadowPos()
scn = game:getLink(VGameCurrentScene):getName()
-- + --
if scn == getObject("Game.GameCurrentCharacter.CharacterScene"):getName() and scn == getObject("Characters[" .. shdw .. "].CharacterScene"):getName() then
pos = getObject("Game.GameCurrentCharacter"):getPoint(VCharacterPosition)
-- + --
getObject("Characters[" .. shdw .. "]"):setValue(VCharacterPosition, { x = pos.x, y = (pos.y - 10) })
end
end
-- * function that will be used to set the shadow character & outfit * --
function defineShadow(c, o)
shdw = getObject("Characters[" .. c .. "].CharacterOutfit[" .. o .. "]")
end
registerEventHandler("mainLoop", "updateShadowPos") -- create loop event
defineShadow("character_name", "outfit_name") -- names are case sensitive
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 your finished game there is Visionaire Studio PRO from €75 or the Indie Bundle for €99.
Until December 1: the Indie Bundle is 30% off with the code BLACKFRIDAY, €69.30 instead of €99.