How do I Scroll To Object At Half Speed

Get help using Construct 2

Post » Mon Dec 01, 2014 2:38 am

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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Mon Dec 01, 2014 3:07 am

Depends on how you are 'scrolling'. Capx?
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Mon Dec 01, 2014 3:28 am

Hey thanks for the reply TiAm

Here ya go.

https://www.dropbox.com/s/r1bca9u7xvi561k/Scroll_00.capx?dl=0
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sat Dec 06, 2014 4:55 am

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
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Dec 06, 2014 7:24 pm

    Hey @Tiam
Thanks for the reply

TiAm wrote:
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.

TiAm wrote: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.

TiAm wrote: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


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.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107


Return to How do I....?

Who is online

Users browsing this forum: Laurent and 10 guests