Home Creators Posts Import Register Favorites Logout

Videos

  • 624394151.mp4

Downloads

Content

Hey all! This is a continuation of our Doggie Lamp project, from here we've made the lamp and we put the lamp face on its own material.

Then we take the lamp to Substance Painter and make some textures.

Next, we upload to SL, make a light prim, link them together and add a script that controls it all! heres the script we've made (you can copy paste the text below into a new script in sl) :

// ===== SETTINGS =====

integer gIsOn = FALSE;

integer GLOW_FACE = 1;

integer LIGHT_LINK = 2;

string TOGGLE_SOUND = "twinkle";

float SOUND_VOLUME = 1.0;

// Light settings

vector LIGHT_COLOR = <1.0, 0.95, 0.8>;

float LIGHT_INTENSITY = 1.0;

float LIGHT_RADIUS = 7.0;

float LIGHT_FALLOFF = 0.6;

default

{

touch_start(integer total_number)

{

gIsOn = !gIsOn;

llPlaySound(TOGGLE_SOUND, SOUND_VOLUME);

if (gIsOn)

{

llSetLinkPrimitiveParamsFast(LINK_THIS, [

PRIM_GLOW, GLOW_FACE, .5

]);

llSetLinkPrimitiveParamsFast(LIGHT_LINK, [

PRIM_POINT_LIGHT, TRUE,

LIGHT_COLOR,

LIGHT_INTENSITY,

LIGHT_RADIUS,

LIGHT_FALLOFF

]);

}

else

{

llSetLinkPrimitiveParamsFast(LINK_THIS, [

PRIM_GLOW, GLOW_FACE, 0.0

]);

llSetLinkPrimitiveParamsFast(LIGHT_LINK, [

PRIM_POINT_LIGHT, FALSE,

LIGHT_COLOR,

LIGHT_INTENSITY,

LIGHT_RADIUS,

LIGHT_FALLOFF

]);

}

}

}

Files

Comments

No comments found for this post.