|
Chaos Borkotron
Registered User
Join date: 14 Jun 2008
Posts: 110
|
06-02-2009 02:38
I cannot get this script to change the whole linkset, it only changes the root prim. What am i doing wrong? default//Daytime { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z < 0) state night;//This says, it's night time else//This is for if it's daytime { llSetAlpha(0.0, LINK_SET); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW,ALL_SIDES,0.0]);//Turn glow off } } timer() { llResetScript();//Reset the script to see if it's still daytime } } //Everything uptop is the same as down here accept it's the opposite. state night { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z > 0) state default; else { llSetAlpha(1.00, LINK_SET); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW,ALL_SIDES,0.15]); } } timer() { llResetScript(); } }
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
06-02-2009 02:53
llSetLinkAlpha perhaps?
you're setting the ALL_SIDES and LINK_SET are the same value, but you are actually using the wrong one in your calls above... the link version takes 3 parameters, and the link target is the first, not the last (side(s) is last for both)
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Chaos Borkotron
Registered User
Join date: 14 Jun 2008
Posts: 110
|
06-02-2009 02:56
FFS now it won't compile and i have 2 start again this script took me 4 weeks to make and now its ballsed keeps saying Function call mismatches type or number of arguments. default//Daytime { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z < 0) state night;//This says, it's night time else//This is for if it's daytime { llSetLinkAlpha([LINK_SET, 0.00]); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW, 0.0]);//Turn glow off } } timer() { llResetScript();//Reset the script to see if it's still daytime } } //Everything uptop is the same as down here accept it's the opposite. state night { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z > 0) state default; else { llSetLinkAlpha([LINK_SET, ALL_SIDES, 1.00], 0); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW,0.15]); } } timer() { llResetScript(); } }
|
|
Lynnore Vaher
Registered User
Join date: 19 Jul 2008
Posts: 16
|
06-02-2009 03:10
You are using the llSetLinkAlpha function the wrong way llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); Look here: http://wiki.secondlife.com/wiki/LlSetLinkAlphaEdit: Your llSetLinkPrimitiveParams are wrong too, you should read the wiki. You forgot to give the face number with the glow. Edit2: I see it now, you were doing it right in the first script you posted but then you changed things that were right. Here is how it should be: default//Daytime { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z < 0) state night;//This says, it's night time else//This is for if it's daytime { llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW, ALL_SIDES, 0.0]);//Turn glow off } } timer() { llResetScript();//Reset the script to see if it's still daytime } } //Everything uptop is the same as down here accept it's the opposite. state night { state_entry() { llSetTimerEvent(200); vector sun = llGetSunDirection(); if (sun.z > 0) state default; else { llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); llSetLinkPrimitiveParams(LINK_SET, [PRIM_GLOW, ALL_SIDES, 0.15]); } } timer() { llResetScript(); } }
|