Jump to content

JKSTek

New Resident
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral
  1. I put several sliding door scripts on a helicopter, but some reversed the side of opening when I sat down, now with this script that Chic Aeon edited it worked perfectly with some modifications. it is very good to use door with glass to open at the same time. I wish you all good humor and good luck in all the good things in life SL and RL. Sliding Door Script * R1 Door Sliding Door Script * R1 Window string OpenSound = "cb340647-9680-dd5e-49c0-86edfa01b3ac"; //Volume to play open sound, 0.0 is same as no sound, 1.0 is max float OpenVol = 1.0; //Sound to play on close, either a UUID or a name in the door contents //if a name, it must be exact. Leave at "" for no sound string CloseSound = "e7ff1054-003d-d134-66be-207573f2b535"; //Volume to play close sound, 0.0 is same as no sound, 1.0 is max float CloseVol = 1.0; integer isOpen = FALSE; vector originalPos; vector defaultpos; float slideBy = 1.0; float TimeInterval = 15; doOpenOrClose() { if (isOpen) { llTriggerSound(CloseSound, CloseVol); llSetPos(originalPos); //llSetPos(defaultpos); isOpen = FALSE; } else { llTriggerSound(OpenSound, OpenVol); llSetPos(<originalPos.x - slideBy, originalPos.y, originalPos.z>); //llSetPos(<defaultpos.x - slideBy, defaultpos.y, defaultpos.z>); // To move alon the y-axis, use this instead: // llSetPos(); isOpen = TRUE; llSetTimerEvent(TimeInterval); } } default { state_entry() { llListen(673, "", "", ""); originalPos = llGetLocalPos(); vector size = llGetScale(); // Set up the amount to move by. Use size.y instead of size.x // if you want to slide along the y-axis. slideBy = size.x - 0.4; } touch_start(integer agentCount) { llSay(673,"doors"); doOpenOrClose(); } timer() { llSetTimerEvent(0.0); /* * Close the door if it isn't already closed */ if (isOpen) doOpenOrClose(); } //} listen(integer channel, string name, key id, string text) { if (text == "doors") { doOpenOrClose(); } } }
×
×
  • Create New...