Streamline Some Code?
|
|
Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
|
06-05-2008 14:10
What would be the way to slim this snippet of code down?
llSetPrimitiveParams( lighton ); llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE]); llSetColor(<1,0.000,0.000>,ALL_SIDES);
Is there anyway yet to set glow and if so ...
My thanks to all that wander this way ...
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
06-05-2008 14:14
From: Dragger Lok What would be the way to slim this snippet of code down?
llSetPrimitiveParams( lighton ); llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, TRUE]); llSetColor(<1,0.000,0.000>,ALL_SIDES);
Is there anyway yet to set glow and if so ...
My thanks to all that wander this way ... Set everything using one llSetPrimitiveParams call, in one big list. It will handle colour and bright and light and so on.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-05-2008 14:16
From: Dragger Lok What would be the way to slim this snippet of code down? Should look like: integer PRIM_GLOW = 25; llSetPrimitiveParams(lighton + [ PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, alphaValue, PRIM_GLOW, glowValue ]);
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
06-05-2008 23:41
From: Hewee Zetkin Should look like: integer PRIM_GLOW = 25; llSetPrimitiveParams(lighton + [ PRIM_FULLBRIGHT, ALL_SIDES, TRUE, PRIM_COLOR, ALL_SIDES, <1.0, 0.0, 0.0>, alphaValue, PRIM_GLOW, glowValue ]);
which will work, break your code as soon as the next client is released...
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
06-06-2008 00:49
I love when people make pompous assed comments and fail to add anything constructive.
_____________________
There are no stupid questions, just stupid people.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
06-06-2008 01:22
From: Johan Laurasia which will work, break your code as soon as the next client is released... True. So you remove that constant declaration line (the one the compiler points out to you when you save the script) and instantly have a script that uses the proper, official constant. It's a GOOD thing.
|
|
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
|
06-06-2008 07:02
Just as an example: list fullBright = [PRIM_FULLBRIGHT, ALL_SIDES, TRUE]; llSetPrimitiveParams(fullBright);
|