Welcome, Guest |
You have to register before you can post on our site.
|
|
|
Region wide delete on command |
Posted by: dr.fuxed - 02-18-2013, 11:05 AM - Forum: Avatar Augmentation Scripts
- Replies (1)
|
|
here is a region wide system to delete your prims or add more commands to do anything you want.
to use (llregionsay_echo.lsl) wear this as hud or whatever.
then add (llregionsay_listner.lsl) to your object/s.
to use simply say die in chat and it will get echoed to llregionsay and your object hears the command and performs the action.
llregionsay_echo.lsl
Code: string message;
default
{
on_rez(integer sp)
{
llResetScript();
}
state_entry()
{ if ( llGetAttached() )
llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
llListen(0,"",NULL_KEY,"");
}
attach(key id)
{
if(id == llGetOwner())
llRequestPermissions(id,PERMISSION_TAKE_CONTROLS);
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_TAKE_CONTROLS)
{
llTakeControls(CONTROL_FWD | CONTROL_BACK ,FALSE,TRUE);
}
}
listen(integer channel, string name, key id, string message)
{
llRegionSay(-5243312,message);
llOwnerSay(message);
}
}
llregionsay_listner.lsl
Code: key owner;
default
{
on_rez(integer start_param)
{
owner=llGetOwner();
}
state_entry()
{
llListen(-5243312,"",NULL_KEY,"");
}
listen(integer channel, string name, key id, string message)
{
if (llToLower(message) == "die")
{
llInstantMessage(owner,"Object died");
llDie();
}
}
}
|
|
|
|