Hi Guys,
[b]I’ve been using the script below & I’ve had a problem trying to get the particles to appear when i need them to. For the shot I’m doing there’s a few people crumbling at different times, if i add the script to the Birth Script op & tell it to start at frame 20 in the Emit Start options for the op, the particles don’t appear unless I enter 0 into the Emit Start.
So I then added an Age Test & turn the Display op to show no geomatry to get the particles to move on & appear at a certain frame in the enxt event but this didn’t work either.
To get around it i used a blend material to make the particles disapear using an opacity in one of the slots, but this means a diferent blend material for each person crumbling & its getting complicated with key frames all over the place. Also because the particles are still in the scene but hidden using the opacity they were still casting shadows & affecting atmosphere effects.
What do I need to add to the script to say when I want the particles to start/appear?
Is there a way to hide & unhide particles that are used in an array like in the script?
Is there a way to start a PFlow system then in the middle hide it then unhide it?
Cheers lads
Stevie
– Grabs objects into a collection and re-distributes into a particle system
– Allan McKay 2005/08/23
on ChannelsUsed pCont do
(
pcont.usetm = true
pcont.useshape = true
)
on Init pCont do
(
global FragIce = $FX_ICE_FRAG_* as array
)
on Proceed pCont do
(
t1 = pCont.getTimeStart() as float
t2 = pCont.getTimeEnd() as float
if ((t1 <= 0) and (t2 >= 0)) then
(
(
pcont.addparticles FragIce.count
for i in 1 to FragIce.count do
(
pcont.particleindex = i
pcont.particleshape = FragIce[i].mesh
pcont.particletm = FragIce[i].transform
)
)
)
)
on Release pCont do
(
gc()
)
[/b]