Using loop to create instances problem

Get help using Construct 2

Post » Sun Sep 09, 2012 3:02 pm

Hi,

Please take a look at my capx
I plan to create 5 planes to fly to clicked location. However, there are way too many planes created and I could not figure out why.
Please can you help my explain it? Thank you very much
B
5
Posts: 17
Reputation: 509

Post » Sun Sep 09, 2012 3:07 pm

I haven't looked at the .capx but I'm guessing you only added the loop as a condition in the event? You should add the loop-event as a sub-event of a trigger condition like "On start of layout", or the event will run every tick and create 5 planes every tick.

So something like this:

[code]+On start of layout:
+Repeat 5 times:
->Create object Plane[/code]Nimtrix2012-09-09 15:09:41
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Sep 09, 2012 4:40 pm

Remove the "wait 5 seconds" and only 5 will be created. With it you get a continuous stream of 5 planes a tick for 5 seconds.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Fri Sep 21, 2012 10:22 am

@R0J0hound: Your solution works great, thank you.
@Nimtrix: Thank you for your solution, it also works

B
5
Posts: 17
Reputation: 509


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Colorfish, zenox98 and 24 guests