Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 11-08-2008, 12:21 PM   #1
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Default particle Emission

hey

i want to emit a particle every time an object rotates 90 in the Z axis.

float $Value = "getAttr frontGunGroup.rz";//gets the .rz
//value and assigns it to a variable

if(($Value % 90) == 0)
setAttr bulletEmitter.rate = 25;
//% is modular(?sp) so i am asking it if $Value divides by
//90 and has a remainder of zero it sets value of 25

i dont know if im barking up the wrong tree as i cant get it to work.
i think i need an else command in there as well
__________________
Now at SMU doing BSc 3D Computer Animation so its hard to get on here
My wire render tut http://forum.simplymaya.com/showthre...threadid=20973
pbman is offline   Reply With Quote
Old 11-08-2008, 01:43 PM   #2
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I'm not really familiar with MEL but didn't you say 'every time'?
I think you need to reset it later, otherwise bulletEmitter.rate will be equal 25 from the first 90 degrees and forth.
Benny
__________________
When in doubt, delete history and freeze transformations.

My latest snake game
(Requires DirectX9 SDK and Framework)
BennyK is offline   Reply With Quote
Old 11-08-2008, 02:30 PM   #3
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes ur right i need an else statement

i used this
bulletEmitter.rate = (frontGunGroup.rotateZ % 90) ? 0 : 25;
//code to make emit on 90 degree intervals

however it emits with a rotate value of 0
i need to omit this value any ideas how
__________________
Now at SMU doing BSc 3D Computer Animation so its hard to get on here
My wire render tut http://forum.simplymaya.com/showthre...threadid=20973
pbman is offline   Reply With Quote
Old 11-08-2008, 05:45 PM   #4
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Default

fixed it now
__________________
Now at SMU doing BSc 3D Computer Animation so its hard to get on here
My wire render tut http://forum.simplymaya.com/showthre...threadid=20973
pbman is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin Copyright © 2000-2015, Jelsoft Enterprises Ltd.