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

Get help using Construct 2

Post » Sat Nov 16, 2013 5:32 pm

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.
B
3
Posts: 7
Reputation: 339

Post » Sat Nov 16, 2013 5:51 pm

Can we see a .capx or at least a screenshot of what's happening?
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Sat Nov 16, 2013 6:24 pm

Got my post working below, with links and all.rocketfuel2013-11-16 18:27:19
B
3
Posts: 7
Reputation: 339

Post » Sat Nov 16, 2013 6:26 pm

@plinkie 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?rocketfuel2013-11-16 18:27:48
B
3
Posts: 7
Reputation: 339


Return to How do I....?

Who is online

Users browsing this forum: apalm1341, blissfulwizard and 18 guests