Modern Country House By Clarity Homes [Assets & door script included]

Thread Started By YoungMoney

7741
5
  • 88 Vote(s) - 2.84 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rate Thread
#1
[Image: 4kfv9l.png]
[Image: 2rw9thl.png]
[Image: 346t1ub.png]

[To see links please register here]

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
    
}

Reply


#2
fantastica!!
Reply


#3
good one, thank you.
Reply


#4
very nice house.
Reply


#5
(02-10-2013, 05:13 PM)YoungMoney Wrote:

[To see links please register here]

[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
    
}

Reply


#6
nice! ty for sharing this
Reply




Possibly Related Threads…
Thread Author Replies Views Last Post
Tongue MINIMAL Kingston House Phange 0 807 02-11-2022, 04:56 AM
Last Post: Phange
  Trompe Loeil :: Dreaming House (V 1.1) Carmilla 0 1,866 06-04-2020, 05:33 AM
Last Post: Carmilla
  ROOST - Casa Verna Cellar House (MESH) Bonfire 5 7,181 03-11-2020, 01:10 AM
Last Post: l33tsauce
  ROOST - Lake Side 'Basement' house (MESH) Bonfire 7 8,316 03-11-2020, 01:08 AM
Last Post: l33tsauce
  MESH!!! KTZ Village House YoungMoney 18 18,901 11-20-2019, 10:08 AM
Last Post: chimeraus
  Concept} Well House Gacha Onetimonly 0 2,614 10-24-2018, 04:45 PM
Last Post: Onetimonly
  KTZ House 3prims! (Pashoot) VaNiTy 0 3,201 06-12-2016, 12:36 AM
Last Post: VaNiTy
  Tree house - The little Denmark - Treehouse (1024 sqm) deadpool 2 6,327 03-03-2016, 09:13 AM
Last Post: zoieviper
  DM & A House Garden YoungMoney 1 4,316 04-04-2013, 09:14 PM
Last Post: LILLYANNE

Forum Jump:

1 Guest(s)
Share this:

About Second Life Copybot

Second Life CopyBot Forum is a place where you can get items for Second Life and other vitual worlds for free. With our CopyBot viewers you can export and import any content from these virtual worlds and modify them in 3D software such as Blender, 3D studio Macx etc...