How do I Activate a "OneShot particles" more than once?

Get help using Construct 2

Post » Fri Oct 31, 2014 9:42 am

Hello,

I'm trying to do something simple but can't find a way to do so.
I would like to stick a 'Oneshot particules' emitter to my character and ask it to spray its oneshot when I need. But I can't find any action in the event system to do that.

Using a continuous spray just for one shot isn't very handy.
And if I'm trying to do this is to avoid creating an emitter for each fx unless emitter creation is not CPU griddy like the sprites! (I don't know)
B
72
S
21
G
12
Posts: 314
Reputation: 12,111

Post » Fri Oct 31, 2014 11:35 am

Hah, that's odd - there's no action like "spray one-shot" for the particle object. I'm sure this would be a quick thing for @Ashley to add in. It'd certainly be useful.

For now though, I guess the best bet is to set it to continuous with a high spray rate, and create a function that toggles spraying on, waits dt seconds, then toggles spraying off. Then just call that function any time you need to do this.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Fri Oct 31, 2014 12:02 pm

Create a new particles object each time you want to fire a one-shot.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Fri Oct 31, 2014 12:17 pm

Ok thank you for your answers.
So I will let my code as it is if creating fx objects has the same CPU usage as spraying manually one .^^
B
72
S
21
G
12
Posts: 314
Reputation: 12,111


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish and 15 guests