Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Particle problems

Author
Message
ThePict
7
Years of Service
User Offline
Joined: 6th Nov 2017
Location:
Posted: 5th Feb 2021 16:38
How do I get rid of Particles? My game uses a lot of Sprites, and as a level completion flourish I added some Particles to fly around. But after the next level is drawn, the remnants of the Particles are still there. I've tried SetParticleActive(i,0), ClearScreen() and SetSpriteActive(i,0). Still the remnants of the Particles remain at the start of the next screen I sync()
Any ideas?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 5th Feb 2021 16:42
SetParticleVisible(i,0)
ThePict
7
Years of Service
User Offline
Joined: 6th Nov 2017
Location:
Posted: 5th Feb 2021 17:06 Edited at: 5th Feb 2021 17:18
SetParticleVisible(i,0) didn't solve it either. I wonder if the particles need to simply 'end their life naturally'... You know, if I could do the end of level flourish, then stop emitting particles, and let them die out, even if next level is being built around them. Would they just twinkle out of view naturally?
Edit: I'm nearly there. I set the particles invisible during gameplay, and only make the visible during the flourish. But still a bit clunky so will persevere.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Feb 2021 21:16 Edited at: 5th Feb 2021 21:17
ThePict
7
Years of Service
User Offline
Joined: 6th Nov 2017
Location:
Posted: 6th Feb 2021 06:52
Solved. I think. After the flourish, in my case an eliptical path I send the particles off the bottom of the visible screen, making Y > 1000, then sync() for a few seconds to let the visible particles die out. Looks a lot better than simply freezing and clearing the screen.

Login to post a reply

Server time is: 2024-11-21 13:26:33
Your offset time is: 2024-11-21 13:26:33