Second Life Copybot Forum
Modern Country House By Clarity Homes [Assets & door script included] - Printable Version

+- Second Life Copybot Forum (https://secondlifecopybot.com)
+-- Forum: SECOND LIFE PRODUCTS (https://secondlifecopybot.com/Forum-SECOND-LIFE-PRODUCTS)
+--- Forum: BUILDING AND OTHER STRUCTURES (https://secondlifecopybot.com/Forum-BUILDING-AND-OTHER-STRUCTURES)
+---- Forum: Residential Structures (https://secondlifecopybot.com/Forum-Residential-Structures)
+---- Thread: Modern Country House By Clarity Homes [Assets & door script included] (/Thread-Modern-Country-House-By-Clarity-Homes-Assets-door-script-included)



Modern Country House By Clarity Homes [Assets & door script included] - YoungMoney - 02-10-2013

Hello Guest!! You need to Register or to view the content



RE: Modern Country House By Clarity Homes [Assets & door script included] - Ernest Genesis - 04-12-2013

fantastica!!


RE: Modern Country House By Clarity Homes [Assets & door script included] - JinKaz - 05-08-2013

good one, thank you.


RE: Modern Country House By Clarity Homes [Assets & door script included] - InigoMontoya - 05-10-2013

very nice house.


RE: Modern Country House By Clarity Homes [Assets & door script included] - pdapp - 05-30-2013

(02-10-2013, 05:13 PM)YoungMoney Wrote: [img][/img]
[img][/img]
[img][/img]
[url=]
[img][/img][/url]
Swinging door script:

Put this into a single door for it to swing open, when approached or touched. It will close by itself.
PHP Code:
// Swinging door LSL script #1
// Handles the touch event.
// Handles the collision event.
// Handles closing the door automatically via a timer event.
// Triggers sounds when the door opens or closes.

// Parameters you might want to change

float  delay 3.0;             // time to wait before automatically closing door
                                // set to 0.0 to not automatically close
float  direction 1.0;         // set to 1.0 or -1.0 to control direction the door swings
float  volume 0.5;            // 0.0 is off, 1.0 is loudest

// Variables you will most likely leave the same

key    open_sound  "cb340647-9680-dd5e-49c0-86edfa01b3ac";
key    close_sound "e7ff1054-003d-d134-66be-207573f2b535";

// Processing for the script when it first starts up

default {
    
// What we do when we first enter this state

    
state_entry() {
        
state open;                        // Move to the open state
    
}
}

// Processing for the script when it is in the closed state

state closed {
    
// What we do when we first enter this state

    
state_entry() {
        
llTriggerSound(close_soundvolume); // Trigger the sound of the door closing
        
llSetRot(llEuler2Rot(<00direction PI_BY_TWO>) * llGetRot());

    }

    
// What we do when the door is clicked ("touched") with the mouse

    
touch_start(integer total_number) {
        
state open;                        // Move to the open state
    
}

    
// What to do when something hits the door

    
collision_start(integer total_number)
    {
        
state open;                        // Move to the open state
    
}

    
// What to do when the timer goes off

    
timer()
    {
        
llSetTimerEvent(0.0);              // Set the timer to 0.0 to turn it off
    
}
}

// Processing for the script when it is in the open state

state open {
    
// What we do when we first enter this state

    
state_entry() {
        
llTriggerSound(open_soundvolume);// Trigger the sound of the door opening
        
llSetRot(llEuler2Rot(<00, -direction PI_BY_TWO>) * llGetRot());

        
llSetTimerEvent(delay);            // Set the timer to automatically close it
    
}

    
// What do do when pulling the door from Inventory if it was saved while open

    
on_rez(integer start_param) {
        
state closed;
    }

    
// What we do when the door is clicked ("touched") with the mouse

    
touch_start(integer total_number) {
        
state closed;                      // Move to the closed state
    
}

    
// What to do when something hits the door

    
collision_start(integer total_number)
    {
        
// Do nothing, the door is already open
    
}

    
// What to do when the timer goes off

    
timer()
    {
        
llSetTimerEvent(0.0);             // Set the timer to 0.0 to turn it off
        
state closed;                     // Move to the closed state
    
}




RE: Modern Country House By Clarity Homes [Assets & door script included] - honeybabyex - 10-30-2019

nice! ty for sharing this