AgeLimit (Particle)
Description
Returns or sets the particle's lifespan as a Long.
C# Syntax
// get accessor Int32 rtn = Particle.AgeLimit; // set accessor Particle.AgeLimit = Int32;
Examples
VBScript Example
'
' Example showing how to programmatically
' set the age limit of particles
'
NewScene , false
set ParTypeCol = CreateParticleType
set oRoot = ActiveProject.ActiveScene.Root
set oParticleCloud = oRoot.AddParticleCloud( ParTypeCol , "MyCloud" )
set oParticleCloudPrim = oParticleCloud.ActivePrimitive
oParticleCloudPrim.AddParticles 1000 , ParTypeCol(0)
set oParticleCollection = oParticleCloudPrim.Particles
set oPos = XSIMath.CreateVector3()
for i = 0 to 9
for j = 0 to 9
for k = o to 9
set oParticle = oParticleCollection( i*100 + j*10 + k )
oPos.x = -5 + i
oPos.y = -3 + j
oPos.z = k
oParticle.Position = oPos
oParticle.Size = 0.5
oParticle.Age = 0
oParticle.AgeLimit = i*10 + j
next
next
next
CreateParticleCloud "MyCloud"
ToggleVisibility "MyCloud"
PlayForwardsFromStart
SOFTIMAGE|XSI v6.01