point helper per particle.
I'm trying to run through the selected particle system and create a point helper for each particle in the system. The problem I'm running into is that it creates duplicates.
pf = $ -- select pflow source range = #(0, 30) fn fnAddKey Obj val curTime = ( with animate on ( objTrack = Obj.pos.x = 5 ) ) for t = range[1] to range[2] do ( MatEditor.Close() local pPos = undefined local flasherObj sliderTime = t count = pf.NumParticles() temp = for i = 1 to count do ( pf.particleIndex = i pPos = pf.particlePosition flasherObj = point wirecolor:yellow pos:pPos fnAddKey flasherObj 1 sliderTime ) )
Comments
This might help. I re-wrote
This might help. I re-wrote the code you originally put in but i put a test on it to only create a new point if one does not exist.
email: [email protected]
Kinda
It's kind of what I was looking for. I want to create a point helper each time a new particle is created. And at the exact time that the particle is birthed I want to animate that halper moving in the z axis "x" amount of units.
I've attached the match file to help get things started.
If you open the file and run the script I posted in the main part of this post youll see the problem.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
You are having the loop which
You are having the loop which creates the particle be called 30 times causing you to make new point helpers since you have a loop running with in another loop. Also be careful with the NumParticles method since that only gives you the number of particles currently at that frame. If you know how many particles you are going to have i would just type it in. I'm also not sure what you are trying to accomplish with this code but this is what i got out of it.
email: [email protected]