This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.
See the Indie Bundle Try it for freegame.HorizontalScrollDistance = (game.WindowResolution.x / 2)
game.VerticalScrollDistance = (game.WindowResolution.y / 2)game.HorizontalScrollDistance = 100
game.VerticalScrollDistance = 100local sx, sy
function CenterActor()
sx = game.HorizontalScrollDistance
sy = game.VerticalScrollDistance
game.HorizontalScrollDistance = (game.WindowResolution.x / 2)
game.VerticalScrollDistance = (game.WindowResolution.y / 2)
end
function ReleaseCenter()
game.HorizontalScrollDistance = sx
game.VerticalScrollDistance = sy
end
function foo(bar)
-- do something with bar
endcenterActor()function test(str,n)
for i = 1, n do
print(str)
end
endtest("I should not swear at the teacher.", 10) -- will write "I should not swear at the teacher." 10x to the logYeah sorry. My bad. I quickly typed it out & didn't take into consideration that it was a single field rather than a table with point (x & y) entries.Not your fault (unless you're a dev of this engine, of course ;-)