Ok,
I have it so it is rezzing the HUD with this script:
default
{
touch_start(integer param)
{
llRezObject("HUD", llGetPos() + <0.0,0.0,1.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);
}
}
And have added this script to the HUD:
integer handle;
default
{
listen(integer channel, string name, key id, string msg)
{
llRequestPermissions( (key)msg, PERMISSION_ATTACH );
}
run_time_permissions( integer vBitPermissions )
{
if( vBitPermissions & PERMISSION_ATTACH )
{
llAttachToAvatarTemp(ATTACH_HUD_CENTER_1);
llSetTimerEvent(0);
llListenRemove(handle);
}
else
{
llWhisper(0, "Permission to attach denied - click the stone again if you want a new try" );
llDie();
}
}
on_rez(integer rez)
{
if(!llGetAttached())
{ //reset the script if it's not attached.
llResetScript();
}
}
state_entry()
{
handle=llListen(-1,"",NULL_KEY,"");
llSay(-1,"who");
// llSay(0,"who");
llSetTimerEvent(30);
}
timer()
{
llWhisper(0, "Permission to attach denied - click the stone again if you want a new try" );
llDie();
}
}
But Its not asking for permission to rattach when it rezzes.... any idea where ive gone wrong?