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. 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 freeif game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then
return true
else
return false
end You could do something along the lines of this...Start off by creating an if lua result action part, in which you should query if both horizontal and vertical scrolling is false, if both are false then it should return true; else it should return false.if game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then return true else return false endAfter that you should insert the action parts you want to execute, then add an else statement after your action parts, followed by a jump to x action action part, make sure it's set to absolute & that you are jumping back to whatever action part number the if lua result action part is. Finally add an end if action part to close off the if query.Quick note: what we have created here is a self contained loop that will prevent any action parts after the block from being executed until it's allowed to end the if query block.P.S: I have not tested this out, so it may or may not work.
You could do something along the lines of this...Start off by creating an if lua result action part, in which you should query if both horizontal and vertical scrolling is false, if both are false then it should return true; else it should return false.if game.ScrollDirectionHorizontal == 0 and game.ScrollDirectionVertical == 0 then return true else return false endAfter that you should insert the action parts you want to execute, then add an else statement after your action parts, followed by a jump to x action action part, make sure it's set to absolute & that you are jumping back to whatever action part number the if lua result action part is. Finally add an end if action part to close off the if query.Quick note: what we have created here is a self contained loop that will prevent any action parts after the block from being executed until it's allowed to end the if query block.P.S: I have not tested this out, so it may or may not work.
-- let's create the function which sets the position of displayed text
function setTextPosHook(text)
-- if text owner is a character then...
if text:getLink(VTextOwner):getId().tableId == eCharacters then
text:setValue(VTextPosition, {x=2325, y=100})
return true
end
end
function txtPos(text)
if text.Owner:getId().tableId == eCharacters then -- if character text
text:setValue(VTextPosition, {x = game.ScrollPosition.x + (game.WindowResolution.x / 2), y = game.ScrollPosition.y + (game.WindowResolution.y - 85)}) -- define the new text position
return true -- update text position
end
return false -- else don't update text position
end
registerHookFunction("setTextPosition", "txtPos") -- define the hook function for handling text positionno worries. both issues?
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.