How do I create three objects one by one in series ?

Get help using Construct 2

Post » Tue Mar 28, 2017 10:00 am

I am making an educational game in construct 2. It contains shooting gun containing three colored balls ( basically, those are charges having red, green and blue color). Each colored charge have two charges, +ve and -ve.

Now, I want those charges to be positioned to spawned (or whatever the simple solution is) one by one and in loop. Let's say I created the red charge then I shoot it. Then, I created the blue charge in place of red charge and then shoot it. Then, I created the green charge in place of blue charge and then shoot it. Now, How do I create or spawn single instance of red charge. I have tried many solutions but didn't work.

Any solution would be highly appreciated.
B
1
Posts: 1
Reputation: 127

Post » Tue Mar 28, 2017 4:07 pm

Best bet is to use a Global variable for this I think.

Each time you shoot, add 1 to the variable.
On the final shot, reset it.

So your event would be something like:
On Mouse click & BallNum==1 -- Shoot Blue & add 1 to BallNum
On Mouse click & BallNum==2 -- Shoot Green & add 1 to BallNum
On Mouse click & BallNum==3 -- Shoot Red & set BallNum to 1
B
9
S
2
Posts: 69
Reputation: 833

Post » Tue Mar 28, 2017 4:17 pm

@msha91
Just done a quick Example CAPX file.

You can get it here: https://1drv.ms/u/s!Au_xHg0ueCl3wQYVTUj0VorZRpMp
B
9
S
2
Posts: 69
Reputation: 833


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 9 guests