How do I Smoothly transition between layouts?

0 favourites
  • 9 posts
From the Asset Store
Contains 601 dynamic, unique, tradecraft movement and transition sounds including morphs, whooshes, swishes, & much more
  • I'm working on an arcade platformer where the player can teleport between several worlds (I'm using layouts for each world). I am looking for a way to smoothly transition between the layouts while keeping the player position relative to before they teleported. Currently when they hit the teleportation it starts them at the beginning of layout and its too jarring to keep in the game.

    Should I be using layers? I need help.

  • So you mean keep them in the same place they were when going between layouts? You can store the playerxy position as global variables on leaving a layout and then on the new layout set the position to the global variables for xy.

  • Yes! As if they were phasing between worlds but remained in the same position.

    Did you mean something like this? I couldn't get it to work.

    System| on end of layout| System| Set PlayerX to Player.X

    | System| Set PlayerY to Player.Y

    System| on start of layout| Player| Set position to (PlayerX, PlayerY)

    System| World \= 0|

  • Could be because I am only using one event sheet?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you make the player sprite a global object it will remain in the same position when transitioning layouts.

  • Well usually you will have an event sheet linked to each layout but up to you really. Your logic seems fine, I don't use end of layout though, maybe that is too late or maybe it works. Check if the global variables update in debug mode.

  • Thanks! Setting the player box and sprite to global variables has helped. Now I just need to make the transition a little smoother.

  • Well the transition should be instant if you are using go to layout.

  • oh it is. Haha, I am trying to add a brief slow motion effect to the player and have the backgrounds fade in as they enter the new layout.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)