Hidiho!
I was wondering how can i create custom chunks with mesh update.
Indeed, the Custom Chunks script, available everywhere (like here: http://www.scriptspot.com/bobo/mxs5/pflow/pflow__Chunks_Basics.htm) allow just to use the mesh at frame 0 and never update it.
I “developped” a script based on the one upthere:
on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.useAge = true
pCont.useTM = true
pCont.useShape = true
pCont.usePosition = true
pCont.useScale = true
pCont.useSpin = true
)
on Init pCont do
(
global ChunksArray = $blop* as array
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
v=(t/192)+1 – i don’t know why but that’s the only way for me
– to have the right number of the frame. Guess it’s a ticks thing.
NumChunks = ChunksArray.count
for i = 1 to NumChunks do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleTM = ChunksArray[i].transform
pCont.particleShape = at time v ChunksArray[i].mesh
pCont.setParticleAge i v
)
)
on Release pCont do
(
)
Works as hell as a birth script with a Delete By Age “1” operator right under it (if you don’t add this… well try it it’s pretty funny)
Anyway, with this script, when I send all this to another event, I don’t need to add another Delete by Age operator, and my particles age!
The problem is when i send to another operator, my mesh chunks stop to update.
So I add a script operator in the new event:
on ChannelsUsed pCont do
(
pCont.useTime = true
pCont.useSpeed = true
pCont.useAge= true
pCont.useTime= true
pCont.useShape= true
)
on Init pCont do
(
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
v=(t/192)+1
NumChunks = ChunksArray.count
for i = 1 to NumChunks do
(
bb=(NumChunks-i)+1
pCont.particleShape = at time v ChunksArray[bb].mesh
print ChunksArray[bb]
print i
)
)
on Release pCont do
(
)
And that’s where the problem is: Only the last chunks update…!!!
I don’t understand… If you can help me works this out it will be great!
Cheers!