Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple Stove Fire Script problem

Cristos Benelli
Nuova Sicilia
Join date: 2 Mar 2007
Posts: 49
04-09-2007 06:06
Hello All,

I'm only on day two of scripting so still working on basics. Can't get my head around the following problem. Trying to build a stove fire triggered by touch using a cylinder prim. The following script makes the fire go on and off, but the top and bottom of the cylinder do not go transparent in either state - in my limited knowledge, the llSetAlpha(100.0, ALL_SIDES) should have accomplished this but apparently not. Here it is:

CODE

default
{
on_rez(integer start_param)
{
llSetAlpha(100.0, ALL_SIDES);
}

state_entry ()
{
llListen(5, "", NULL_KEY, "");
}

listen (integer channel, string name, key id, string message)
{
if ( message == "fire on")
{
llSetTexture("21eeb911-d57a-6a7b-44cd-b9d905860ac6", 1);
llSetColor(<255,255,255>, 1);
llSetAlpha(0.0, 1);
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, 1,1,1,1.0, 1,9.25);
}
else if ( message == "fire off")
{
llSetAlpha(100.0, ALL_SIDES);
}
}
}


Appreciate the help!

Best,

Cristos
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
04-09-2007 06:27
From: Cristos Benelli
Hello All,

I'm only on day two of scripting so still working on basics. Can't get my head around the following problem. Trying to build a stove fire triggered by touch using a cylinder prim. The following script makes the fire go on and off, but the top and bottom of the cylinder do not go transparent in either state - in my limited knowledge, the llSetAlpha(100.0, ALL_SIDES) should have accomplished this but apparently not. Here it is:

CODE

default
{
on_rez(integer start_param)
{
llSetAlpha(100.0, ALL_SIDES);
}

state_entry ()
{
llListen(5, "", NULL_KEY, "");
}

listen (integer channel, string name, key id, string message)
{
if ( message == "fire on")
{
llSetTexture("21eeb911-d57a-6a7b-44cd-b9d905860ac6", 1);
llSetColor(<255,255,255>, 1);
llSetAlpha(0.0, 1);
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, 1,1,1,1.0, 1,9.25);
}
else if ( message == "fire off")
{
llSetAlpha(100.0, ALL_SIDES);
}
}
}


Appreciate the help!

Best,

Cristos


0.0 = transparent
1.0 = full solid
Cristos Benelli
Nuova Sicilia
Join date: 2 Mar 2007
Posts: 49
04-09-2007 06:40
Thanks Newgate, much appreciated!

Best,

Cristos