Ayane Philly Posted December 10, 2019 Share Posted December 10, 2019 What is the correct way to change the bright glow and alpha in an object inside a timer? I wanna make a light that turnoff all and then on faster with a texture on it. default { state_entry() { llSetTimerEvent(2); } timer() { llSleep(0.5); } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 10, 2019 Share Posted December 10, 2019 (edited) All you need to script is a simple toggle switch. Basically integer iSwitch; default { state_entry() { llSetTimerEvent(2.0); //Or whatever time you want ... } timer() { iSwitch = !iSwitch; if (iSwitch) { // Turn stuff ON } else { // Turn stuff OFF } } } And in this case, you use llSetLinkPrimitiveParams to set your desired values of alpha (in the PRIM_COLOR paramater) and PRIM_GLOW. (EDIT: Oh yes, and PRIM_FULLBRIGHT. Thank you, Fritgern. ) Edited December 10, 2019 by Rolig Loon typos, of course 1 Link to comment Share on other sites More sharing options...
Fritigern Gothly Posted December 10, 2019 Share Posted December 10, 2019 (edited) Try this: default { state_entry() { llSetTimerEvent(2); } timer() { llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_FULLBRIGHT, ALL_SIDES, 1, PRIM_GLOW, ALL_SIDES, 1.0, PRIM_COLOR, ALL_SIDES, llGetColor(ALL_SIDES), 0.5]); } } Note that I used PRIM_COLOR to set the alpha, because there is no constant for alpha I had to use the alpha property of PRIM_COLOR. Alternatively, you can use llSetAlpha(0.5, ALL_SIDES); instead of the PRIM_COLOR thing. Edited December 10, 2019 by Fritigern Gothly Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now