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 freefunction disableScroll()
if game.CurrentCharacter.AnimState ~= 1 then
-- wenn der Charakter nicht läuft (1 = walk)
game.ScrollCenterCharacter = false
else
game.ScrollCenterCharacter = true
end
end
registerEventHandler("mainLoop", "disableScroll")function NewScroll()
if game.ScrollCenterCharacter == false then -- wenn Zentrieren auf Charakter ausgeschaltet ist
local pos = game.CurrentCharacter.Position -- Charakterposition speichern
local scrollpos = pos.x - game.WindowResolution.x/2 -- Scrollposition auf X-Achse berechnen (obere linke Ecke des Bildschirms)
if scrollpos < 0 then scrollpos = 0 end
if game.ScrollPosition.x ~= scrollpos then
game.ScrollToPoint = {x = scrollpos, y = game.ScrollPosition.y} -- zur neuen Position scrollen (nur X-Achse)
end
end
end
registerEventHandler("mainLoop", "NewScroll")function disableScroll()
if isSceneScrolling() == false then
if game.CurrentCharacter.AnimState ~= 1 then
game.ScrollCenterCharacter = false
else
game.ScrollCenterCharacter = true
end
end
end
registerEventHandler("mainLoop", "disableScroll")
-- Call "isSceneScrolling()" to check if a scene is currently scrolling
is_scrolling_h = false
is_scrolling_v = false
last_scene = game.CurrentScene
last_pos = game.ScrollPosition
function checkScrolling()
cur_scene = game.CurrentScene
cur_pos = game.ScrollPosition
if cur_scene == last_scene then
is_scrolling_h = (cur_pos.x ~= last_pos.x)
is_scrolling_v = (cur_pos.y ~= last_pos.y)
else
last_scene = cur_scene
is_scrolling_h = false
is_scrolling_v = false
end
last_pos = cur_pos
end
registerEventHandler("mainLoop", "checkScrolling")
-------------------------------------------
function isSceneScrolling(dir)
if dir == "h" then
return is_scrolling_h
elseif dir == "v" then
return is_scrolling_v
else
return (is_scrolling_h or is_scrolling_v)
end
endThis 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.