Jump to content
Sign in to follow this  
UG1005

attribute increasing by 1 each frame

Recommended Posts

Hello!

Suppose I have a particle that keeps generating every frame from an object.
When the particle is generated, it has an attribute of some kind, and that attribute is 1 at the frame when the particle is generated.
Is there any way to add 1 to that attribute every frame after it occurs?

For example, suppose that the PARTICLE occurs at frame 15.
Five frames later, at frame 20, that attribute would be 6.

I would appreciate it if someone could tell me how to do this.

Share this post


Link to post
Share on other sites

You can use the particle age attribute and divide it by the time increment. 

i@myattrib = floor(@age/@Timeinc);

 

Share this post


Link to post
Share on other sites
6 hours ago, Sepu said:

You can use the particle age attribute and divide it by the time increment. 


i@myattrib = floor(@age/@Timeinc);

 

Thank you so much!!
It worked!

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×