0 Favourites

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

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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

  • msha91

    Just done a quick Example CAPX file.

    You can get it here:

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