SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / Changing radiusPP
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 22-12-2004, 06:33 PM   #1
powernemo
Registered User
 
powernemo's Avatar
 
Join Date: Jan 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default Changing radiusPP

Hi there,

I have this simply excpression but i can't figure what's wrong:

Runtime Expression Before Dynamics mapped on radiusPP of my ParticleShape2 (blobby Surface)
here's :

float $raggio=.05;
if($raggio<.2)
{

$raggio=.05+(time/20);
particleShape2.radiusPP=$raggio;
}

i want my blobbies start from .05 size and grow up 'til .2 but in some case blobbies grow time after time without stopping in other case they won't grow. What's wrong? What's the correct implementation?
thnx
powernemo is offline   Reply With Quote
Old 28-12-2004, 01:55 PM   #2
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

ok you need to do this first:

create a creation expression first (in the same way you made a runtime one) but do this:

//this is your start value
particleShape2.radiusPP == 0.05;

then change your runtime expression to something like this:

//get the value of the radiusPP
float $raggio = particleShape1.radiusPP;

//compare it to the max value you want them to grow to
if($raggio < 1)
{
//add a value on this can be anything you want it to be
$raggio+=0.001;
//set the value of the radiusPP
particleShape1.radiusPP=$raggio;
}

That should work.

:bandit:
Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 29-12-2004, 01:14 AM   #3
powernemo
Registered User
 
powernemo's Avatar
 
Join Date: Jan 2003
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

Yeah! Thanx alot man!!! It works great!!!:tup:
powernemo is offline   Reply With Quote
Old 29-12-2004, 11:26 AM   #4
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

No problem

:bandit:

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.