I just want one of a certain item on screen...

0 favourites
  • 4 posts
From the Asset Store
Cartoon Funny Item Interface Sound Pack comes with 426 high-quality sound effects
  • Hello again, everybody!

    So, I've got my jet pack guy who has a particle stream coming out of the bottom of the jet pack for like a fire effect. Cool!

    The way I have it right now, when I press the button so he's facing right, the fire spawns on a layer below him, and when I push the button so he's facing left the fire spawns on a layer above him. I like how that all works, but whenever I push the buttons any time after that it just spawns more fire effects. I have it so the fire is destroyed when he turns around, but I only want one fire effect to be present on the screen at a time and I can't figure out a way to do that.

  • Can we see a .capx or at least a screenshot of what's happening?

  • Got my post working below, with links and all.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sure thing.

    Basically, I've got it set up so that when I press the button to make him face a certain direction, all at once he turns in the direction, fires a bullet and spawns the jetpack effects.

    You can see here (http://imgur.com/vjNQOnt) (no hyperlinks for noobies, how frustrating!!!!), the space guy and the jetpack effects coming out behind him. At this point I have pressed the "S" key once so that he faces right, fires a bullet and one jetpack effect spawns

    And here (http://imgur.com/1ViVshU) you can see that when I keep firing a bullet the jetpack effects pile up.

    Here (http://imgur.com/QuYeHFo) he is facing left, jetpack effects in front of him. I've pressed the "A" key once, so he turns left, fires a bullet and spawns one jetpack effect.

    And here (http://imgur.com/PWTIyy) he is firing multiple bullets, jetpack effects piling up.

    So, I just want one jetpack effect at a time. So far the only way I've figured out how to spawn the jetpack effects in the correct positions and layers and everything is tie them to the firing mechanism, but like you see that produces the piling up of the effects. Is there a way to inhibit the spawning of an item if it is already present on the screen or something?

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