122 list l = llGetPrimitiveParams([PRIM_POS_LOCAL,PRIM_ROT_LOCAL]);
123 vector v = llList2Vector(l,0);
124 rotation r = llList2Rot(l,1);
154 vector size = llGetScale();
155 vOffset = <(size.x*0.45),(size.y*0.5),0.0>;
177 listen(integer ChannelNumber,
string Name, key Id,
string Message)
211 if ( !
door_locked || (llDetectedKey(0) == llGetOwner()) )
217 llWhisper(PUBLIC_CHANNEL,
"This door is currently locked.");
241 llWhisper(PUBLIC_CHANNEL,
"PLEASE BE CAREFUL! This door is already open.");
243 else if ((llDetectedKey(0) == llGetOwner()) || !
door_locked)
249 llWhisper(PUBLIC_CHANNEL,
"PLEASE BE CAREFUL! This door is currently locked.");
state_entry()
Initialise the Door/Window swing parameters.
touch_start(integer total_number)
Process when a touch is detected.
collision_start(integer total_number)
Process collisions with the door/window.
listen(integer ChannelNumber, string Name, key Id, string Message)
Listen to the channel selected in state_entry() and process any commands received.
string LOCK_NAME
The string for the Lock Command.
float closed_angle
The Angle that the door/window will be in the Open State.
integer OPEN_STATE
Flag indicating the dooe/window is open.
integer UNLOCK_STATE
Flag indicating the dooe/window is unlocked.
vector vOffset
The movement offset of the door/window when opened.
rdSwingDoor()
Swing the Door/Window between Open and Closed.
string UNLOCK_NAME
The string for the Unlock Command.
string OPEN_NAME
The string for Open Windws Command.
integer door_locked
Value indicating if the door/window is currently locked or unlocked.
integer CLOSE_STATE
Flag indicating the dooe/window is closed.
integer COMMAND_CHANNEL_NUMBER
This is the channel where the script accepts remote commands.
integer listen_handle
Listen handle.
integer intSwing
Angle the door/window will swing.
rotation rotSwing
Swing angle in a rotation vector.
integer LOCK_STATE
Flag indicating the dooe/window is locked.