IMPORTANT: ALWASY CLEAN THE SCRIPT FROM UNWANTED CODES BY PASTING ON A NOTEPAD. THE COPY IT FROM THE NOTEPAD AND PASTE IT ON THE SL SCRIPT.
integer CHANNEL = 7;
string COMMAND = "noi vogliamo giocare e imparare l'italiano";
integer OWNER_ONLY = FALSE;
// Exploding Objects script, by Dale Innis
// Do with this what you will, no rights reserved
// See https://wiki.secondlife.com/wiki/ExplodingObjects for instructions and notes
integer lh = 0;
init() {
llListenRemove(lh);
key who = NULL_KEY;
if (OWNER_ONLY) who = llGetOwner();
lh = llListen(CHANNEL,"",who,COMMAND);
llOwnerSay("To cause collapse, say '"+COMMAND+"' on channel "+(string)CHANNEL);
llRequestPermissions(llGetOwner(),PERMISSION_CHANGE_LINKS);
}
default {
// usual faffing about
state_entry() {
init();
}
on_rez(integer x) {
llResetScript();
}
changed(integer change) {
if (change & CHANGED_OWNER) llResetScript();
}
// the part that actually does something interesting
listen(integer c,string name,key id,string msg) {
llSetStatus(STATUS_PHYSICS,TRUE);
llSetPrimitiveParams([PRIM_TEMP_ON_REZ,TRUE]);
llBreakAllLinks();
}
// faffing about with permissions
run_time_permissions(integer perms) {
if (!(perms & PERMISSION_CHANGE_LINKS)) {
llOwnerSay("Well, the collapsing stuff isn't going to work, then!");
}
}
}
Comments (0)
You don't have permission to comment on this page.