fanadventures.net

Header
English
 
Forum overview > Reset scene scroll position - don't scroll to
  • Reset scene scroll position - don't scroll to

    by andiliddell · Thursday, 17. March 2016, 01:20 h ~ 3 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
    andiliddell
  • by AFRLme · Thursday, 17. March 2016, 01:48 h ~ 3 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.

    1
    AFRLme
  • by andiliddell · Sunday, 20. March 2016, 11:12 h ~ 3 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.
    andiliddell
  • by AFRLme · Sunday, 20. March 2016, 13:03 h ~ 3 years ago
    No problem at all mate.wink
    AFRLme
  • by andiliddell · Tuesday, 22. March 2016, 20:44 h ~ 3 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?
    andiliddell
  • by andiliddell · Tuesday, 22. March 2016, 20:52 h ~ 3 years ago
    This seems to be caused by using fade to scene... again.

    I've changed it to "immediately show scene" and its fine.
    andiliddell
  • by AFRLme · Tuesday, 22. March 2016, 23:43 h ~ 3 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)

    1
    2

    Change the transition time & easing to whatever you like.
    AFRLme
  • New post