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.

AppGameKit Classic Chat / AddParticlesColorKeyFrame quandry with repetitive keyframes

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Jun 2012 18:11 Edited at: 9th Jun 2012 18:11
I'm using this command to a few sparkles to my app at the moment. I have a particular scenario where I want to keep changing the colour of the particles at random:

AddParticlesColorKeyFrame( 1, 2.0, random(128,212), random(128,212), random(128,212), 255 )

So I keep changing the value every 0.2 seconds, for about 5 seconds. My question is, am I causing any problems by doing this? Am I stacking up a whole array of Keyframes, or is it intelligently replacing the Keyframe at 2.0 seconds? I can't think of a way to test whether I'm breaking it.

I also don't see a way to clear a Keyframe, do we have to delete the particles entity and recreate it to reset the Keyframes?

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jun 2012 03:27
They will accumulate until you call ClearParticlesColors which clears all the color key frames.

Login to post a reply

Server time is: 2024-11-23 15:18:55
Your offset time is: 2024-11-23 15:18:55