Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPrimitiveParams

Neal McAlpine
Registered User
Join date: 24 Dec 2006
Posts: 33
03-05-2007 12:45
When I try to set PRIM_COLOR and PRIM_TEXTURE of two faces of a prim in one single llSetPrimitiveParams command, I get... well, weird results.
When using two seperate llSetPrimitiveParams commands, one for setting the color and one for setting the texture, it works fine. But this causes yet another 0.2 second delay. What that !&&%$ delay shall be good for in this command, god - pardon, the Lindens - only knows.

Am I doing something wrong, or is it simply broken?

working:
CODE
llSetPrimitiveParams([PRIM_COLOR, 5, <1.0, 1.0, 1.0>, 1.0,
PRIM_COLOR, 4, <1.0, 0.0, 0.0>, 1.0,
]);

llSetPrimitiveParams([PRIM_TEXTURE, 4, tex_one, <0.1, 0.1, 0.0>, <-0.553, 0.450, 0.0>, 0.0,
PRIM_TEXTURE, 5, tex_two, <3.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0
]);


NOT working:
CODE
llSetPrimitiveParams([PRIM_COLOR, 5, <1.0, 1.0, 1.0>, 1.0,
PRIM_COLOR, 4, <1.0, 0.0, 0.0>, 1.0,
PRIM_TEXTURE, 4, tex_one, <0.1, 0.1, 0.0>, <-0.553, 0.450, 0.0>, 0.0,
PRIM_TEXTURE, 5, tex_two, <3.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0
]);
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
03-05-2007 16:23
Sorry, I really can't see what the problem is here. However, you could put the two working calls in two other scripts and call them via llLinkMessage with LINK_THIS, so each script will carry a .2 sec penalty. A bonus is that there is no time penalty in your main script.

Someone else might offer a better suggestion?
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
03-05-2007 19:13
I think I've met this bug before. Have you tried reversing the order of the parameters? i.e. put the PRIM_TEXTURE params before the PRIM_COLOR params. I can't clearly remember the case where I had this issue, but I think changing the order around helped.
Neal McAlpine
Registered User
Join date: 24 Dec 2006
Posts: 33
03-05-2007 22:54
LOL
I shuffled them a bit and that really did the trick.
Thank you very much, Kermitt!
Full of... surprises, that LSL :)
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
03-06-2007 02:52
Someone should check if this bug exists in the 1.13.4.3 preview with llSetLinkPrimitiveParams.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Neal McAlpine
Registered User
Join date: 24 Dec 2006
Posts: 33
03-06-2007 23:47
Should anyone have the same problem, this worked for me:
CODE
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 1.0,
PRIM_TEXTURE, 5, tex_one, <3.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0,
PRIM_COLOR, 4, color_one, 1.0,
PRIM_TEXTURE, 4, tex_two, <0.1, 0.1, 0.0>, <0.0, 0.0, 0.0>, 0.0
]);