Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HUD object to attachment

Jaydin Normandy
Registered User
Join date: 1 Apr 2006
Posts: 19
07-07-2008 08:50
I have a hud that needs to be picked up from the ground and then attached to the screen. I have two pieces. The first piece is the actual HUD that attaches, which is flat. I created a 3D non-functioning version of the HUD that is on the ground. I want the user to be able to touch the 3D HUD on the ground and have the 2d-functioning version to attach to their screen. Is there anyway to script this?
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
07-07-2008 09:41
definatly use this in your 2d object, i imagin you touch the 3d on, a 2d one rezzes and then attaches <note> the attaching prim must be owned by the person wanting to attach it

CODE

key owner;

default
{
state_entry()
{
owner = llGetOwner();
}
on_rez(integer r)
{
owner = llGetOwner();
llRequestPermissions(owner,PERMISSION_ATTACH);
}
run_time_permissions(integer perm)
{
if(perm)
{
llAtachToAvatar(ATTACH_HUD_TOP_RIGHT);
}
}
}


theys are the attachment points you can use

ATTACH_HUD_CENTER_2
ATTACH_HUD_TOP_RIGHT
ATTACH_HUD_TOP_CENTER
ATTACH_HUD_TOP_LEFT
ATTACH_HUD_CENTER_1
ATTACH_HUD_BOTTOM_LEFT
ATTACH_HUD_BOTTOM
ATTACH_HUD_BOTTOM_RIGHT
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
07-07-2008 09:44
From: Jaydin Normandy
I have a hud that needs to be picked up from the ground and then attached to the screen. I have two pieces. The first piece is the actual HUD that attaches, which is flat. I created a 3D non-functioning version of the HUD that is on the ground. I want the user to be able to touch the 3D HUD on the ground and have the 2d-functioning version to attach to their screen. Is there anyway to script this?


Reminds me of a griefing object someone once tried. They made the original object for sell and on the change event of selling it attempted to attach.