Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer swing=1;
- integer pullLever;
- default
- {
- on_rez(integer start_param)
- {
- llResetScript();
- }
- touch_end(integer total_number)
- {
- llPassTouches(FALSE);
- }
- link_message(integer source, integer num, string str, key id)
- {
- if (str = "On")
- {
- state toggleLever;
- }
- }
- }
- state toggleLever
- {
- touch_end(integer total_number)
- {
- llPassTouches(FALSE);
- pullLever =!pullLever;
- if (pullLever)
- {
- llPlaySound("lever", 1.0);
- llSleep(1.7);
- llPlaySound("takeoff bell", 1.0);
- llSleep(1.5);
- rotation rot = llGetLocalRot();
- rotation delta = llEuler2Rot(<-PI/4*swing,0,0>);
- rot = delta * rot;
- llSetLocalRot(rot);
- llSleep(0.25);
- rot = delta * rot;
- llSetLocalRot(rot);
- llPlaySound("Tardis Takeoff", 1);
- llSay(12,"takeoff");
- llSay(0,"takeoff");
- llSetText("Dematerialising...", <1,1,1>, 1.0);
- llSleep(9.3);
- llLoopSound("inflight", 6.0);
- llSetText("In Transit", <1,1,1>, 1.0);
- }
- else if (!pullLever)
- {
- //llTriggerSound("tardis door close",9.9);
- llSay(12,"land");
- llSay(0,"land");
- llPlaySound("tardis2", 1);
- llSetText("Materialising...", <1,1,1>, 1.0);
- llSleep(6.0);
- llSetText("Landed", <1,1,1>, 1.0);
- llSleep(0.5);
- rotation rot = llGetLocalRot();
- rotation delta = llEuler2Rot(<PI/4*swing,0,0>);
- rot = delta * rot;
- llSetLocalRot(rot);
- llSleep(0.25);
- rot = delta * rot;
- llSetLocalRot(rot);
- }
- }
- link_message(integer source, integer num, string str, key id)
- {
- if (str = "Off")
- {
- state default;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement