Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Display Script Operator in Pflow? How?

Display Script Operator in Pflow? How?

Anonymous
Not applicable
850 Views
5 Replies
Message 1 of 6

Display Script Operator in Pflow? How?

Anonymous
Not applicable
Can someone explain how to get the Display Script Operator in Pflow show a value? I tried using the default script operator and then tried copy/pasting the line from the max help on Display Script -- "pCont.particleFloat = length(pCont.particleSpeed)*4800" in numerous places in the script and it never worked.
0 Likes
Accepted solutions (1)
851 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

I think your syntax doesn't read well by 3ds max, or it was error.

don't use syntax, if you don't know max script

use particle View.. 3ds max have alot stuffs for PF

 

 

goodluck !!!

 

Edited by
Discussion_Admin

0 Likes
Message 3 of 6

Anonymous
Not applicable

The syntax is directly copied from the max help file so it should be correct.

 

I know maxscript to some extent --- but not as it relates to PFlow.  I wanted to experiment but I can't even get the Display Script to work.

 

 

0 Likes
Message 4 of 6

Anonymous
Not applicable
Accepted solution

OMG, there is so much BS and spam coming out of BlackParasite's derrière...

 

@Anonymous,

 

01) just create a Standard Flow for playing purposes

02) add a Script Operator to the bottom

03) add a Display Script to the bottom, set Show Script Data to Float

04) in Script Operator, Edit script

05) add the command

 

pCont.particleFloat = length(pCont.particleSpeed)*4800

 

just below pCont.particleIndex = i

 

don't change anything else, unless you know what you are doing...otherwise, Oleg might kill you.

 

Now at this stage, you'd still see a bunch of ??? flying around...what's missing ? Love...ALOT of love !!!!

 

Well here's the secret ingredient, near the top, find the line pCont.useSpeed = true, copy and paste below it, then change it to

 

     pCont.useFloat = true

 

Why  ? because remember we set it to Float in step 03...

 

And there you are, do you feel like John Nash right now ?....oh yeah...did you subscribe to BlackParasite ? I'm sure he doesn't spam...noooooooo...

Message 5 of 6

Anonymous
Not applicable

also if you want to see the particles fly out as per Standard Flow you can comment out the script like this:

 

    for i in 1 to count do
    (
        pCont.particleIndex = i
         pCont.particleFloat = length(pCont.particleSpeed)*4800
/*        if length(pCont.particleSpeed) > slowSpeed then -- slow it down
            pCont.particleSpeed -= dragCoef*timeDif*pCont.particleSpeed
        newLen = length(pCont.particleSpeed)
        if newLen > verySlowSpeed then
            pCont.particleSpeed = pCont.randDivergeVector(pCont.particleSpeed)(divAngle/(160*newLen))
        else
            pCont.particleSpeed = pCont.randDivergeVector(pCont.particleSpeed)(180.0)
        if length(pCont.particleSpeed) < 1.5*slowSpeed then
        (
            if pCont.particleID < 50 then -- first 50 particles to left if slow enough
                pCont.particleSpeed += [-0.005*timeDif, 0, 0]
            else -- particles after 50 to right if slow enough
                pCont.particleSpeed += [0.005*timeDif, 0, 0]
        )*/
    )

 

So it doesn't follow the 'turb' in the supplied script, you can delete some more bits above it as well but I thought, nah...might as well leave it in there to play around with...

Message 6 of 6

Anonymous
Not applicable

Thank you!

 

The useFloat was what I needed.  I think Adesk should mention that critical line in the docs for Display Script.

 

 

0 Likes