This script was tested and works on OpenSim version 0.7.4!

collision_alarm.lsl
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2013 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
integer enableRLV = FALSE;
 
default {
    state_entry() {
        integer comChannel = ((integer)("0x"+llGetSubString((string)llGetOwner(),-8,-1)) ^ 0x3FFFFFFF) & 0xBFFFFFFF;
        llListen(comChannel, "", llGetOwner(), "");
        llOwnerSay("@version=" + (string)comChannel);
        llSetTimerEvent(30);
    }
    listen(integer channel, string name, key id, string message) {
        if(llStringLength(message) != 0) enableRLV = TRUE;
        state detect;
    }
    timer() {
        state detect;
    }
    on_rez(integer num) {
        llResetScript();
    }
}
 
state detect
{
    collision_start(integer num) {
        if(llDetectedType(0) & AGENT) jump hiss;
        return;
@hiss; 
        vector pointTo = llDetectedPos(0) - llGetPos();
        if(enableRLV == TRUE) llOwnerSay("@setrot:" + (string)llAtan2(pointTo.x, pointTo.y) + "=force");
        llPlaySound("Hiss_" + (string)((integer)llFrand(10)), 1);
        llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
    }
    run_time_permissions(integer perm) {
        if(perm & PERMISSION_TRIGGER_ANIMATION) {
            llStartAnimation("Scratch");
            return;
        }
    }
    on_rez(integer num) {
        llResetScript();
    }
}

secondlife/collision_alarm/collider.txt ยท Last modified: 2022/11/24 07:46 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.