Reset scene scroll position - don't scroll to

  • #1, by andiliddellThursday, 17. March 2016, 01:20 9 years ago
    Hi all,

    Is there a simple way to immediately reset the scroll position of a long room back to left hand side?

    I've tried the "scroll scene to object" action but I don't want to see the animation, I just need the scene camera position to be back at 0,0 when the scene starts.

    The "centre on character" doesn't seem to be working either, as the character appears at the far left of the scene, but the scene is still over at the right (from a previous cut scene) and doest see him walk in?

    Any help would be great?
    Cheers
    Andi

    Forum Fan

    178 Posts


  • #2, by afrlmeThursday, 17. March 2016, 01:48 9 years ago
    Center scene on character permanently (clear centering unticked) should position the camera as close to the center of the character as possible.

    You can quickly snap the scroll position of a scene with this line of Lua script...
    game.ScrollPosition = {x = 0, y = 0} 0 -- replace the 0's with whatever coordinates you want to snap the camera to.
    

    Imperator

    7285 Posts

  • #3, by andiliddellSunday, 20. March 2016, 11:12 9 years ago
    This is great, thanks. It's all starting to come back to me now. I think I set this up with a tween for the final scene of fantasy quest.

    Thanks again for the help.

    Forum Fan

    178 Posts

  • #4, by afrlmeSunday, 20. March 2016, 13:03 9 years ago
    No problem at all mate. wink

    Imperator

    7285 Posts

  • #5, by andiliddellTuesday, 22. March 2016, 20:44 9 years ago
    Hi again,

    I finally got around to trying this and I still have a problem. Maybe someone can suggest a solution?

    At the end of one scene I use an action to change to a new scene, but I want to set the scroll position for the scene I'm going to before it is shown.

    Currently it changes to the new scene then you see it snap to the new game position. Is it possible to set the scroll position of a scene BEFORE you change to that scene, so it's already in place when you get there?

    Forum Fan

    178 Posts

  • #6, by andiliddellTuesday, 22. March 2016, 20:52 9 years ago
    This seems to be caused by using fade to scene... again.

    I've changed it to "immediately show scene" and its fine.

    Forum Fan

    178 Posts

  • #7, by afrlmeTuesday, 22. March 2016, 23:43 9 years ago
    Lots of people have reported issues on the fade scene transitions. Only one I know that works for sure is the default one. You can create a manual fade in if you really want. At begin of scene add an execute a script action part containing...
    game.CurrentScene.Brightness = 0
    game.CurrentScene:to(500, {Brightness = 100}, easeQuintOut)
    

    Change the transition time & easing to whatever you like.

    Imperator

    7285 Posts