How do you make a sprite only spawn one sprite at a time?

0 favourites
  • 3 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I want my sprite to spawn another sprite at a certain position. The problem is that if you create an invisible sprite at that location and make it so that the sprite spawns to other sprite on collision whit or overlapping offset whit the invisible sprite the sprite will spawn the another sprite infinitly. I want to only be able to have one of the spawn object in the game at the time. I tried making events that would do that.

    http://postimg.org/image/3szwd8bvf/

    I created a instance variable called Amount and tried making it so when too much sprites would be on screen they would get destroyed. The problem is that all versions of the sprite get destroyed when the amount is reached not just the last spawned one. It mamkes the sprite not spawn anything. Is there a way make it os only a certain amount of one sprite can be in the game at once otherwise no more can be spawned?

  • On collision should only trigger once, for it is a triggered event..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On collision should only trigger once, for it is a triggered event..

    I changed from overlapping at offset to on collision whit and now it worked. But i have another similiar problem. I have set a sprite to spawn another sprite on line of sigth whit another sprite. The problem is that it doesn't just spawn one sprite, rather one sprite per frame so it spawns alot. How can i make it just spawn one sprite on line of sigth?

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