PDA

View Full Version : PFlow by maxscript


Diiin85
03-26-2012, 08:25 AM
Hi guys, i got this problem with maxscript.
I want to authomatically generate a particle flow system with a script and i would love to generate a Standard flow but it seems to be impossible. How can i do?
Alternatively I created this little script

particleFlow.beginEdit()
pf1=pf_source logosize:10 name:"PFS1" standard_flow:true
rp1=renderParticles()
pf1.appendAction(rp1)
pf2=pf_source logosize:10 name:"PFS2"
rp2=renderParticles()
pf2.appendAction(rp2)

evt1=event()
evt1.appendAction(birth())
evt1.appendAction(position_icon())
evt1.appendAction(speed())
evt1.appendAction(rotation())
evt1.appendAction(displayparticles())
evt1.appendAction(shape_instance())
ft1=find_target()
evt1.appendAction(ft1)

evt2=event()
evt2.appendAction(birth())
evt2.appendAction(position_icon())
evt2.appendAction(speed())
evt2.appendAction(rotation())
evt2.appendAction(displayparticles())
evt2.appendAction(shape_instance())
ft2=find_target()
evt2.appendAction(ft2)

evt3=event()
evt3.appendAction(displayparticles())

ft1.setNextActionList evt3 ft1
ft2.setNextActionList evt3 ft2
particleFlow.endEdit()
ParticleFlow.openParticleView()

Well the problem is that this script doesn't work! When i see the particle view i see the pflowsystem with a render action, i see the events but i see no connection between the pflow system1 and the event001 (the same for pfs2) and I can't find a way to bind the pflow to the event! And even worst when i manually set the link between them nothing is showing! Please help me i have been searching all over the net and i found absolutely nothing about it. Therefore maxscript documentation is very badly made :(

Diiin85
03-26-2012, 08:37 AM
Sorry here is the right code, i posted a backup

pf2=pf_source logosize:10 name:"PFS2"
pf1=pf_source logosize:10 name:"PFS1"

particleFlow.beginEdit()
rp1=renderParticles()
pf1.appendAction(rp1)

rp2=renderParticles()
pf2.appendAction(rp2)

evt1=event()

evt1.appendAction(birth())
evt1.appendAction(position_icon())
evt1.appendAction(speed())
evt1.appendAction(rotation())
evt1.appendAction(shapeLibrary())
evt1.appendAction(displayparticles())

ft1=find_target()
evt1.appendAction(ft1)

evt2=event()
evt2.appendAction(birth())
evt2.appendAction(position_icon())
evt2.appendAction(speed())
evt2.appendAction(rotation())
evt2.appendAction(shapeLibrary())
evt2.appendAction(displayparticles())

ft2=find_target()
evt2.appendAction(ft2)


evt3=event()
evt3.appendAction(shapeLibrary())
evt3.appendAction(displayparticles())

ft1.setNextActionList evt3 ft1
ft2.setNextActionList evt3 ft2



particleFlow.endEdit()
ParticleFlow.openParticleView()

3ak
03-26-2012, 08:56 AM
pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2

Diiin85
03-26-2012, 12:16 PM
pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2
Tnx you made my day, i spent like 5 hours to find out....

Diiin85
03-27-2012, 02:14 PM
Another simple question, I made a shape instance event. How can i assign an object to it to use as shape?

Tnx ;)

CGTalk Moderation
03-27-2012, 02:14 PM
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.