How do I Scroll To Object At Half Speed

0 favourites
  • 5 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • When the player dies the camera "scrolls to" re-spawn point at normal speed. How do i change it so the camera scrolls to the re-spawn point at half speed.

    I tried changing the time scale but that had no effect.

    Thanks for any help.

  • Depends on how you are 'scrolling'. Capx?

  • Hey thanks for the reply TiAm

    Here ya go.

    https://www.dropbox.com/s/r1bca9u7xvi561k/Scroll_00.capx?dl=0

  • Well, you may have sorted this out by now, but here goes:

    https://www.dropbox.com/s/kt6za6yc6yzz1 ... .capx?dl=0

    Look for 'Tmod' to find some comments I left. A few other things I noticed:

    1. You are building you levels with TiledBG objects. Any reason why? Tilemap is a lot easier for this sort of thing.

    2. All the TiledBG objects have physics+solid. Again: why? Physics has a hell of an overhead if you don't need it (I don't see it referenced in your events anywhere).

    3. In one place you were using an animation frame as a condition to spawn an object (your player). This is a bad idea, as frames can be skipped, or stay onscreen longer than you intend. In your case, this occasionally led to 3 or 4 players being created on re-spawn. I patched it by inserting a 'trigger once' condition after it, but you should still re-jigger this logic.

    Oh, and while it's probably way overkill for your present project, there also magicam:

    plugin-magicam-for-c2-alpha-6-5-1-8-14_t74513

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply

    1. You are building you levels with TiledBG objects. Any reason why? Tilemap is a lot easier for this sort of thing.

    2. All the TiledBG objects have physics+solid. Again: why? Physics has a hell of an overhead if you don't need it (I don't see it referenced in your events anywhere).

    Uh, I haven't come across using tilemap yet, but I believe i read using BG is better for performance. Although the BG_Tiled_Blok is more aesthetic, i was using the physics to contain the food when created. I think w/o the physics the food would fly out and overlap the BG Bloks. I will have to go back and check on this.

    3. In one place you were using an animation frame as a condition to spawn an object (your player). This is a bad idea, as frames can be skipped, or stay onscreen longer than you intend. In your case, this occasionally led to 3 or 4 players being created on re-spawn. I patched it by inserting a 'trigger once' condition after it, but you should still re-jigger this logic.

    I was trying to get the exact second to spawn the player. When the beam of light hits the ground and bounces back up, that's when i wanted to spawn the player. I guess i could have used a System Wait event to do that.

    Oh, and while it's probably way overkill for your present project, there also magicam:

    Yeah, I was trying to stay away from plugins. At one point i was using the tween plugin but on asking for help and posting my capx some users didn't have it. So I found a workaround using just the sine behavior, and it's a bit easier for me to add that logic.

    Also, on the "ScrollBud" event & action, you just fried my brain with that! I'm gonna need to spend some time to look all that up & understand that better.

    Again, thank you for all your help.

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