|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
03-01-2006 16:37
Can I declare values in the MakeParticles() function? For instance, I want to use a button to change the color of my particles, so instead of making another script, I want to be able to do: MakeParticles(STARTCOLOR,ENDCOLOR)...
.... ,PSYS_PART_START_COLOR, STARTCOLOR //Starting RGB color ,PSYS_PART_END_COLOR, ENDCOLOR //Ending RGB color
and later do this MakeParticles("<0.0,0.0,1.0>","<1.0,1.0,1.0>")instead of this: ,PSYS_PART_START_COLOR, <0.0,0.0,1.0> //Starting RGB color ,PSYS_PART_END_COLOR, <1.0,1.0,1.0> //Ending RGB color
I want to change values dynamically so to speak LOL :/
|
|
Lindsey Dassin
Fallen Angel
Join date: 14 Sep 2005
Posts: 33
|
03-01-2006 16:51
Barring any unforseen issues, heck yeah! Your syntax would look something like this: MakeParticles( vector startColor, vector endColor ) { ... llParticleSystem( [ ... , PSYS_PART_START_COLOR, startColor , PSYS_PART_END_COLOR, endColor ... ] ); ... }
state my_state/default/whatever { touch_start/state_entry/some_event() { ... MakeParticles( < 0.0, 0.0, 1.0 >, < 1.0, 1.0, 1.0 > ); ... } }
_____________________
:wq
|
|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
Yay! Question...
03-01-2006 17:49
I try to use it with decimals: ...integer minSpeed... and I get a syntax error. It's not a string is it? I am missing something small yet important. What is it?
|
|
Thorne Kaiser
Nice Guy
Join date: 29 Nov 2005
Posts: 132
|
03-01-2006 17:52
Ah....float Got it 
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
03-02-2006 14:16
Just wanted to comment that I'm glad my script is being used ^_^
llParticleSystem needs the correct types... it doesn't do typecasting. That's why a string containing a key doesn't work and you need to typecast it into a key.
|