Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Want 2 sides only?

Sweetheart Baskerville
Registered User
Join date: 1 Jan 2004
Posts: 32
10-09-2006 21:16
I have this fire script but it shows the fire on every side, top, bottom, sides, full front,full back... i only want the fire to show up on the front and back not the rest... here is the script if someone can please fix it..would be most appreciated...

float delay=4;
integer flamech=5345;
key scream="a233103c-982e-d3de-dd93-68c6e1a8e482";

default
{
state_entry()
{
llSetStatus(STATUS_PHANTOM, TRUE);
llSetTexture("lit_texture", ALL_SIDES);
llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 15.0);
llListen(0,"","","";);
}

listen(integer number, string name, key id, string message)
{
message=llToLower(message);
if(message=="no fuego!";)
{
llSetScale(<.1,.1,.1>;);
llSleep(0.7);
llSetTexture("alpha",ALL_SIDES);

llWhisper(flamech,"no fuego!";);
}
else if(message == "fuego!";)
{
llSetScale(<4.138,.033,4.485>;);
llSetTexture("lit_texture",ALL_SIDES);
llPlaySound(scream,10);
llSetTimerEvent(delay);
}
}
timer()
{
llWhisper(flamech,"fuego!";);
llSetTimerEvent(0);
}
}
BamBam Sachertorte
floral engineer
Join date: 12 Jul 2005
Posts: 228
10-09-2006 21:45
Try setting alpha on the other four sides to 0. You need to do this using a script because you can't set transparency higher than 90% through the texture edit dialog.
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
10-09-2006 21:45
Rather than specify the sides to show that fire anim on, just make the prim flat, like 0.01 thick.
Sweetheart Baskerville
Registered User
Join date: 1 Jan 2004
Posts: 32
I did...
10-09-2006 21:51
I did make the box flat.. but the tops and very tiny sides show the fire flickering also...as if a line/lines are disecting all around the fire...
Sweetheart Baskerville
Registered User
Join date: 1 Jan 2004
Posts: 32
sides?
10-09-2006 21:53
I don't understand anything about scripting sorry... you said to put the other 4 sides to 0 not sure what sides...
Vares Solvang
It's all Relative
Join date: 26 Jan 2005
Posts: 2,235
10-09-2006 22:12
Each side has a number assigned to it so you can change it's texture independantly. The LSLWiki has good stuff about it:

http://www.lslwiki.com/lslwiki/wakka.php?wakka=side
_____________________
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
10-09-2006 22:19
Which sides depends on which way is flattened.

The box sides are, from normal rotation (0 rotation on all axis)
up = 0
north = 1
east = 2
west = 3
south = 4
down = 5

If i recall correctly this is correct. and This is assuming there is no hollow or path cut, as that throws a couple more sides in before the bottom.

Here's a script I use to check my sides

CODE

vector clrWhite = <1.0, 1.0, 1.0>;
vector clrRed = <1.0, 0.0, 0.0>;
integer intChan = 0; // Set to whatever channel you want to use

default
{
state_entry()
{
llSetColor(clrWhite, ALL_SIDES);
llSetText("", clrWhite, 1.0);
llListen(intChan, "", llGetOwner(), "");
}

listen(integer chan, string name, key id, string msg)
{
if (llToLower(msg) == "clear")
{
llSetColor(clrWhite, ALL_SIDES);
llSetText("", clrWhite, 1.0);
return;
}

if (llToLower(llGetSubString(msg, 0, 4)) == "side ") // assumes a digit follows
{
integer side = (integer)llGetSubString(msg, -1, -1); // only allows single digit.
llSetColor(clrWhite, ALL_SIDES);
llSetColor(clrRed, side);
llSetText("Side " + (string)side, clrWhite, 1.0);
}
}
}


This assumes that you always use 'side 0' through 'side 9'. I dunno if more complex shapes can have more than the 10 sides (0 through 9).

But it would allow you to check which side is which. Try this script in various shapes, you might be surprised how the sides are ordered, especially when you start adding hollow or path cuts into it.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
10-11-2006 09:38
There is a handy debug (if the 'Client' and 'Server' menus are not showing in your menu bar, you must press CTRL-ALT-D to make them appear first) feature for this. If you choose 'Select texture' in the Edit window and click on a prim face (as if you were going to manually change the texture of that one face), you can then press CTRL-ALT-SHIFT-T and it will dump to your chat log some info about that face, including the side number.
Sweetheart Baskerville
Registered User
Join date: 1 Jan 2004
Posts: 32
Thank you
10-11-2006 13:38
Thanks for the information... will surely help...