SimplyMaya Forums

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


SM Forums / Maya Questions / Dynamics & Special Effects / particle Emission

Dynamics & Special Effects Maya Particles, nDynamics, Fluids, Rigid Bodies & General VFX

Join the conversation. Reply to post
 
Thread Tools
11-08-2008, 11:21 AM   #1
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
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
  Reply with quote
11-08-2008, 12:43 PM   #2
BennyK
Registered User
 
BennyK's Avatar
 
Join Date: Oct 2007
Location: IL
Posts: 738
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)
  Reply with quote
11-08-2008, 01:30 PM   #3
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
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
  Reply with quote
11-08-2008, 04:45 PM   #4
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
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
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delayed particle tracking stwert Dynamics & Special Effects 3 20-03-2014 06:46 PM
particle direction with animated characters Razor Blade Dynamics & Special Effects 0 19-05-2012 01:01 AM
creating a particle grid on plane or otherway round. bendingiscool Programming 3 19-05-2008 11:33 PM
how to emit only one particle? fxfreak1 Dynamics & Special Effects 1 22-06-2006 07:45 PM
Texture or material on particles? dax3d Dynamics & Special Effects 6 24-04-2003 12:07 AM