Wait a second before moving onto a new instance

Discussion and feedback on Construct 2

Post » Sun Feb 05, 2017 10:20 am

Hi guys

I have a bunch of instances of an object on the screen.

On solving the level, I would like to fade them out, starting with the 1st and waiting a second before starting the fade on the next instance.

Could you guys help me to get this working as a loop?

I've tried but all my instances seem to fade at the same time.

If it helps, I've given each instance a name (instance variable set from 1-10).

Thank you heaps in advance for any help :)
B
43
S
21
G
9
Posts: 142
Reputation: 8,928

Post » Sun Feb 05, 2017 12:34 pm

B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918

Post » Mon Feb 06, 2017 4:29 am

On instance 1 destroyed, start instance 2 fade etc...
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Mon Feb 06, 2017 7:16 am

Hi guys

Thank you for your replies.

What if I want to do this with something else, like changing the opacity etc.

change 1st instance to 10%, wait a second, do the second and so on?

Any idea how I would do this with a loop?
B
43
S
21
G
9
Posts: 142
Reputation: 8,928

Post » Mon Feb 06, 2017 10:47 am

Then you use Timer behavior for timings & Lerp to directly animate the opacity.
Or Timer behavior for timings & 3th party LiteTween behavior to directly manipulate the opacity.
B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918

Post » Tue Feb 07, 2017 12:24 am

Hey

Thank again for your help :)

I can animate the instances on the stage when I address them separately without issues.

What I'm having a problem with, ia trying to use a loop to perform this.

- Let say I have 3 instances on stage - I would like to loop through them and perform some kind of animation, with a 1 second pause in-between.

- Now, if I add two more instances to the stage, I would like the loop to perform the same without changing the code.

Thanks again!
B
43
S
21
G
9
Posts: 142
Reputation: 8,928

Post » Tue Feb 07, 2017 10:14 am

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

Pick how ever you like in event 6 & 14.
B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests