PDA

View Full Version : Expression woes


XminusOne
06-30-2008, 11:10 PM
I've started this thread, but wanted to direct the attention of the expression guru's to it in here in case they miss it. I would greatly appreciate any help. Thanks!!!'

http://forums.cgsociety.org/showpost.php?p=5238821&postcount=4

dangermouse
07-01-2008, 02:20 AM
T_ExplosionShape.spriteTwistPP = "spriteTwistStart" + "twistArrayMap.outValuePP" ;

should be

T_ExplosionShape.spriteTwistPP = spriteTwistStart + twistArrayMap.outValuePP ;

the quotes treat them as strings. hence "converting string... to float"

you might have made the same mistake in other places, but my brain hurts too bad to read it all

Aikiman
07-01-2008, 06:54 AM
Yeah get rid of all your quotations first and Im not sure if you can call the outvalue for the array map like that, you may need to query it first and throw it into an array, then use that variable, but Id try without quotes first.

XminusOne
07-01-2008, 02:43 PM
Thanks guys, i'll try that and see what happens. Thanks again!!!

XminusOne
07-01-2008, 05:12 PM
One more guys. Sorry:blush:

I've got this expression written for instancing particles.

particleShape1.mass=rand(5,10);
particleShape1.userScalar1PP=rand(0,3);
Vector $m=rand(50,200);
particleShape1.mass=$m;
particleShape1.userVector1PP=$m/100;
particleShape1.userScalar1PP=rand(0,3);

I get the //Error: "$m" is an undeclared variable. But the variable is declated with particleShape1.mass=$m; isn't it? What did I do wrong? Thanks for any help again. Much appreciated.

XminusOne
07-01-2008, 05:33 PM
Son of a B....I just had to make the V in Vector lowercase. Sorry about that. I'm a tool.

XminusOne
07-01-2008, 06:48 PM
I've used a creation expression on a VectorPP attr I added:
particleShape1.userVector2PP=rand(0,360);
and runtime before dynamics expression:
particleShape1.userVector2PP+=<<15,15,15>>>;
to randomize and determine the degree of rotation per frame of some instanced geometry on some particles. I set the Rotation to use userVector2PP, the particles collide with a plane as well. I want the rotations to stop after they collide. Problem is, i'm not quite sure how to do that. Any help is appreciated. Thanks!!!

CGTalk Moderation
07-01-2008, 06:48 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.