setting pflow particle positions


Hi! I am trying to manually set positions for my particles with this script

fn pcreate pos =(
pf = $'PF_Source 001'
pf.Event002.Birth_001.amount = pos.count
for i = 1 to pf.numParticles() do pf.setParticlePositionByID i pos[i]
part = pcreate (for o in objects collect o.pos)

When I collect the position array and step through the function manually, it works great. When I call the function from inside of the script it doesn’t seem to work. Or if it does work, the particles are repositioning themselves before the viewport can redraw.

I am running this from regular maxscript not a pflow script operator.

Thanks, I will update if I find a solution.


Looks like I have to add a redrawviews() before I reposition the particles. If I scrub the animation, they will all reset. I think this is due to the fact I am not running the script from a pflow script operator.

To be honest, the whole pflow scripting inside of pflow is still a bit confusing to me. Working on it!


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.