How to : PFlow from group of objects?

I was wondering if its possible to create a PFlow that takes a group of objects as its source, both the geometry of the objects AND their positions/rotations. Whenever I use shape instance on a group of objects I cannot work out how to make pflow take the objects original positions as the particles spawn point and rotation.

Yeah, you need to use a birth script.

Select all your objects, name them the same thing with an underscore and numerical increment.

Drop this into your birth script:

on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useTM = true
pCont.useShape = true
)
on Init pCont do
(
global ChunksArray = $pfloor_* as array
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
if t < 0 do
(
NumChunks = ChunksArray.count
for i = 1 to NumChunks do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleAge = 0
pCont.particleTM = ChunksArray.transform
pCont.particleShape = ChunksArray.mesh
)
)
)
on Release pCont do
(
)

Replacing pfloor_* with the name of your objects.

Hide the originals and display geometry and they’ll all be controllable through pflow.

you’re not a gangsta your a gent…

Thanks for that!

One problem though, I can’t seem to get it to work. I assume I still need to use a shape instance to tell pflow what particles to use?.. and a position object?

Actually, I just found this similar script. http://www.scriptspot.com/bobo/mxs5/pflow/pflow\_\_Chunks\_Basics.htm

There is one difference in the script compared to yours.

example:
pCont.particleTM = ChunksArray.transform**

yours :
pCont.particleTM = ChunksArray.transform
The script on that page works in that I get the particles forming, but my objects are floating off the surface by quite a distance. I made sure to center pivots, and reset-xform before running the birth script, but the elements still refuse to sit in the original transform position.