How do I use the Zone Scoll tutorial to achieve this effect?

0 favourites
  • 6 posts
From the Asset Store
Carousel Animation, make carousel of you image gallery or anything
  • Hi there, our little game is using this fantastic capx provided a while ago ... ... a-movement

    However, what we would really like to happen is for the game to 'pause' briefly after the zone scroll has completed so the player can see the new zone and react to dangers etc. Something similar to this ...

    Many, many thanks!

  • Personally, this seems a little clunky to me. Rather than checking for an overlap, processes like this is done cheaper with 'Pick nearest'. Create a bunch of Zone markers just as you would in the other example. Every tick, find the nearest one and perform the same scrolling action. As a sub-event, use the following action. It checks if scrollx / y are within a margin (in this case 1) of their target. If they are, it pauses the game, waits a specified period of time (in this case 2 seconds), and then un-pauses the game.

    Zone.X - 1 < ScrollX < Zone.X + 1

    Zone.Y - 1 < ScrollY < Zone.Y + 1

    Trigger once while true

    |-> System > Set time scale to 0

    |-> System > Wait 2 seconds

    |-> System > Set time scale to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there, thank you ever so much for replying mrtumbles !

    I have set the first part of the event to the following ...

    However this scrolls to the nearest room, not the room the player is in. Have I done this correctly?

    Is there any chance you could provide a capx to show me properly (forgive my stupidity!)

  • It just needs to be

    lerp( scrollx, Room.X, dt * n )

    Where 'n' is the scrolling speed. Sorry, didn't notice the mess that expression was in. NB the origin point of your room should be the center for this to work correctly.

    ( As a side-Q: how is it possible that the nearest room to the player isn't the room with the player in it? )

  • Ah, this works - the issue here though is that rooms that are larger than the screen size.

    Using the camera zone method previously outlined, it bound the camera to the player when in a larger room. This now scrolls to that room but doesn't follow the player's movements within a room that is larger than the screen size.

  • The pause. ... .capx?dl=0

    Adjust the timing to your liking.

    Adjust the lerp so the player is able to move more into view.

    Place the events that move monsters in the right group. Each group holds events for that room.

    Monsters in other rooms where the player is not, will go on non active / wait for the player to see them, i know that.

    Use a Boolean on the room to keep a group unlocked, once unlocked, if that is what you want.

    Regarding the above comments, that is done in a cheaper way. (well ages ago already)

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