After you Subscribe email your username
and receipt to
goonsquad.me@gmail.com
Membership Options
Pay With Bitcoin
  • 21 Vote(s) - 3.1 Average
  • 5
  • 4
  • 3
  • 2
  • 1
Thread Modes

Modern Country House By Clarity Homes [Assets & door script included]
YoungMoney Offline
Super Moderator
******
Super Moderators

Posts: 842
Threads: 813
Joined: Feb 2013
Reputation: 596
[Image: 4kfv9l.png]
[Image: 2rw9thl.png]
[Image: 346t1ub.png]

[Image: sHxfu.png]

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
    
}


Ernest Genesis
Unregistered

 
fantastica!!

JinKaz
Unregistered

 
good one, thank you.

InigoMontoya Offline
Admin+
**********
Admin+

Posts: 1,658
Threads: 503
Joined: Apr 2013
Reputation: 632
very nice house.

pdapp
Unregistered

 
(02-11-2013, 06:13 AM)YoungMoney Wrote: You are not allowed to view links. Register or Login to view.[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
    
}



Possibly Related Threads...
Thread / Author Replies / Views Last Post
1 Replies 558 Views
Last Post by Torachan
08-11-2016, 10:49 PM
0 Replies 339 Views
Last Post by ShanP37
06-12-2016, 01:57 PM
0 Replies 300 Views
Last Post by Minaj
06-12-2016, 01:36 PM
17 Replies 2,044 Views
Last Post by zoieviper
03-03-2016, 10:12 PM
2 Replies 559 Views
Last Post by zoieviper
03-03-2016, 10:09 PM
1 Replies 491 Views
Last Post by LILLYANNE
04-05-2013, 10:14 AM




Users browsing this thread: 1 Guest(s)

Color Skins

Change Color:

Background Patterns:

Background Images:

Background Header:

Setting Panel

Main Options: