CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-26-2012, 08:25 AM   #1
Diiin85
New Member
portfolio
Maurizio
Salerno, Italy
 
Join Date: Dec 2010
Posts: 9
PFlow by maxscript

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 :(
 
Old 03-26-2012, 08:37 AM   #2
Diiin85
New Member
portfolio
Maurizio
Salerno, Italy
 
Join Date: Dec 2010
Posts: 9
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()
 
Old 03-26-2012, 08:56 AM   #3
3ak
Know-it-All
 
Join Date: Dec 2002
Posts: 495
pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2
 
Old 03-26-2012, 12:16 PM   #4
Diiin85
New Member
portfolio
Maurizio
Salerno, Italy
 
Join Date: Dec 2010
Posts: 9
Quote:
Originally Posted by 3ak
pf1.appendInitialActionList evt1
pf2.appendInitialActionList evt2

Tnx you made my day, i spent like 5 hours to find out....
 
Old 03-27-2012, 02:14 PM   #5
Diiin85
New Member
portfolio
Maurizio
Salerno, Italy
 
Join Date: Dec 2010
Posts: 9
Another simple question, I made a shape instance event. How can i assign an object to it to use as shape?

Tnx
 
Old 03-27-2012, 02:14 PM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:15 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.