Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Hud Script

LaZy Hulka
Registered User
Join date: 11 Apr 2006
Posts: 32
08-02-2006 16:33
This script is use for a hud.

What do the scripts do is it hide the prims on the hud so you can make a hud that works for a weapon or somthing and you can just add this to your script. The first script is main. The main script well show and keep showing the prim it is in. The second script well hide or show when you touch first or the prim that main script is in like a buttom or another prim.


If you want a example please IM LaZy Hulka for a free Pvp Abuse Hud that show you how script work. I also modle hud or other combat item feel free to IM me.

:cool: First and main script
CODE

//This is the main script this is use for a hud. Add this to first prim this prim well not hide/ go invisible. This prim well also be showing. The other script well make every thing elss on hud hide and show
//********************************************************************************************************************************************************
//You can Change the HIDE or SHOW to what ever just edit the other scritp to. You can change it so it can hide or show one thing and not others.
integer visible = TRUE;

default
{
touch_start(integer num)
{
if(visible == FALSE)
{
llMessageLinked(LINK_SET,0,"SHOW",NULL_KEY); //This well show the button when touch
visible = TRUE;
return;
}
if(visible == TRUE)
{
llMessageLinked(LINK_SET,0,"HIDE",NULL_KEY); //This well hide the button when touch
visible = FALSE;
return;
}
}
}


:cool: Second script
CODE

// This is the script that you well add to the button or one you want to show and hide. The other script is the main script.
string text;
default
{
link_message(integer sender,integer num,string msg,key id)
{
if(msg == "HIDE")
{
llSetAlpha(0,ALL_SIDES);
llSetText("",<1,1,1>,1);
state hidden;
}
}
}

state hidden
{
link_message(integer sender,integer num,string msg,key id)
{
if(msg == "SHOW")
{
llSetAlpha(1,ALL_SIDES);
llSetText(text,<1,1,1>,1);
state default;
}
}
}



Thank For read and look at my message. How this script works for you if you have any question feel free IM or leave a reply and i'll try get back to for "ASAP" :cool:
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Discussion Thread
08-02-2006 23:00
/54/06/126671/1.html
_____________________
i've got nothing. ;)
LaZy Hulka
Registered User
Join date: 11 Apr 2006
Posts: 32
08-03-2006 12:36
If this script does not work please in game IM LaZy Hulka or find me here. http://www.boomp.com/board/?mforum=shenanigans
_____________________
USMC Time to kick ass and take names later. Show No Mercy

High Noble
Registered User
Join date: 29 Jun 2006
Posts: 0
sweet script
08-30-2006 13:51
im using this script on my hud.....yes my hud is a freebie...... anyway it is a great script i made a few changes tho to suit my needs but other than that i give this script a 10/10 :) keep up the good wotk