PDA

View Full Version : expression won't work anymore...


BadG3r
05-08-2007, 09:10 AM
Hey guys...
while ago i wrote this lil expression

--------------------------------------------------------------------------------

//particleDissolve

//particleShape1
//runtime

vector $pos = position;
float $trigger = 1 - (age/lifespan);

if ($trigger == 0 )

{

emit -object particle2 -at velocity -vv <<0,3,0>> -at position -vv $pos;

}


//particleShape2
//creation

particleShape2.lifespanPP = rand (1,3);


//runtime

$normAge = particleShape2.age/particleShape2.lifespanPP;

particleShape2.opacityPP = 1 - $normAge;

particleShape2.radiusPP = 0.05 + ((0.005 - 0.05) * $normAge);

--------------------------------------------------------------------------------


problem is.. that it doesn't work anymore. don't know why but when the particle in p1 dies no particle is created in p2.

for p2 lifespan is set to PP, but i tried every possible option. constant, random, PP.

any guess? thx in advance.

BadG3r

BadG3r
05-09-2007, 07:53 PM
anyone tried the expression???

*hope*

BadG3r
07-22-2007, 09:27 PM
//particleShape1
//runtime

vector $pos = position;
float $trigger = 1 - (age/lifespan);

if ($trigger == 0 )

{

emit -object particle2 -at velocity -vv <<0,3,0>> -at position -vv $pos;

}




ok had to rethink the whole script and found the glitch. the vector variables are not assigned correctly.

the right way is:

...

position ($pos.x) ($pos.y) ($pos.z)
-at velocity -vv 0 3 0

....


just for those who wondered with me.

BadG3r
07-23-2007, 07:57 PM
and, totally forgot, the trigger can be a bitch so i used instead:

if (age>=lifespanPP)

...

CGTalk Moderation
07-23-2007, 07:57 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.