how do you limit spawn amount?

This forum is currently in read-only mode.
  • hi, i've just gone through the ghostshooter tutorial which was great, and i'm now in the process of making simple changes, in an attempt to use these skills without the tutorial.

    I have created a section in the UI for ammo, and managed to get it to display the ammo count, and reduce each time a shot is fired.

    However when the private varible of the ammo shot reaches 0 i cannot make the spawn stop.

    I have tried selecting when the varible is at 0 the bullet object gets destroyed, but the bullet still flickers up for a second, i've also tried hiding in behind the background, and then using the destroy event but the same thing happens.

    Any auggestions?

    Thanks for any help you can give

    P.s sorry for any bad spelling etc, on my mobile

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I'm not sure how your events are set up, but usually it's something like:

    private variable is >0

    -on click

    Basically your checking that there is ammo, and allowing it to fire in a sub event.

    If the first condition is not met the second wont happen.

  • thanks thats great, i left the shoot command default, how it was shown in the tutorial, which had just the event to shoot. Just need to make that the sub event of the varible. Cheers for the help much appreciated.

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