PDA

View Full Version : PFlow Scripting


bigquix
10-10-2009, 06:15 AM
Hello friends

I have listened to Bobo's PFlow-scripting tutorial DVDs from CGAcademy and they are really useful
I've got a problem and I need a little help
I have distributed some particles on a mesh vertices (base on DVD 2) and after a collision, they are sent to another event which has a wind force. after 20 frames of that event they are needed to land on another object's vertices. the problem is that although I followed the tutorials, the particles still land on the origin.
here is the script operator which defines the vectors:




on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useVector = true
)

on Init pCont do
(

)

on Proceed pCont do
(
count = pCont.NumParticles()
theMesh2 = snapshotAsMesh $myGrid02
for i in 1 to count do
(
pCont.particleIndex = i
if pCont.particleAge == 0 and pCont.particleID <= theMesh2.numverts do
(
pCont.particleVector = getVert theMesh2 pCont.patricleID
)
)
delete theMesh2
)

on Release pCont do
(

)


what should I modify in the code so that I can get the desired result?

CGTalk Moderation
10-10-2009, 06:15 AM
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.