ainst Composer Posted March 28, 2019 Share Posted March 28, 2019 (edited) Hello! I want to embed the brightness and glowing of certain surfaces in this door script to simulate the inclusion of light in the refrigerator. It will be two prims - the refrigerator itself and the door. only two faces will be lit accordingly. Advise how to do this? and another question. Will it work if the fridge itself is part of the linket? The script is written by the forum participant string door_sound = "743e6ba4-65a8-d641-da12-6dc20e37eceb"; integer intSwing =90; rotation rotSwing; vector vOffset; default{ state_entry(){ rotSwing = llEuler2Rot(<0.0,0.0,(float)intSwing>*DEG_TO_RAD); //90 degrees on the z axis vector size = llGetScale(); vOffset = <(size.x*//0.5 .45),(size.y*.5),1>;//open away from someone standing in front of face 2 -- that is, in front of the prim -- hinged on the left. } touch_start(integer total_number){ llPlaySound (door_sound, 1.0); list l = llGetPrimitiveParams([PRIM_POS_LOCAL,PRIM_ROT_LOCAL]); vector v = llList2Vector(l,0); rotation r = llList2Rot(l,1); llSetPrimitiveParams([PRIM_POS_LOCAL,v+(vOffset-vOffset * rotSwing)*r,PRIM_ROT_LOCAL,rotSwing*r]); rotSwing.s*=-1; } } Edited March 28, 2019 by ainst Composer Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 28, 2019 Share Posted March 28, 2019 Use llSetLinkPrimitiveParamsFast to toggle the glow and fullbright properties of the selected faces, depending on whether rotSwing.s is positive or negative. 1 Link to comment Share on other sites More sharing options...
Rachel1206 Posted March 28, 2019 Share Posted March 28, 2019 Didi you try and search the wiki... the second sample on the page Category:LSL Light is and good example on how do implement this. Replace ALL_SIDES in the sample with the face values of the inside of door and the inside of the refrigerator. 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 28, 2019 Share Posted March 28, 2019 Actually, you don't even need a script to do this. Fullbright and glow don't show through objects, so just put them on the inside of the refrigerator and keep the door shut when you don't want to see them. 1 1 Link to comment Share on other sites More sharing options...
ainst Composer Posted March 28, 2019 Author Share Posted March 28, 2019 1 hour ago, Rolig Loon said: Actually, you don't even need a script to do this. Fullbright and glow don't show through objects, so just put them on the inside of the refrigerator and keep the door shut when you don't want to see them. Yes, great idea, most likely I will do it! just wanted to add some realism. Link to comment Share on other sites More sharing options...
ainst Composer Posted March 28, 2019 Author Share Posted March 28, 2019 2 hours ago, Rachel1206 said: Didi you try and search the wiki... the second sample on the page Category:LSL Light is and good example on how do implement this. Replace ALL_SIDES in the sample with the face values of the inside of door and the inside of the refrigerator. Thanks very much! 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