Jump to content

Search the Community

Showing results for tags 'script'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • People Forum
    • Your Avatar
    • Make Friends
    • Lifestyles and Relationships
    • Role Play
    • General Discussion Forum
    • Forums Feedback
    • Missed Connections
    • Second Life Education
  • Places and Events Forum
    • Favorite Destinations
    • Upcoming Events and Activities
    • Games in Second Life
  • Official Contests & Events
    • Leap Into Love Snapshot Contest
  • Creation Forum
    • Fashion
    • Art, Music and Photography
    • Animation Forum
    • Bakes on Mesh
    • Machinima Forum
    • Building and Texturing Forum
    • Mesh
    • LSL Scripting
    • LSL Library
    • Sansar for Second Life Residents
  • Technology Forum
    • Second Life Server
    • Second Life Viewer
    • Second Life Web
    • General Second Life Tech Discussion
  • Commerce Forum
    • Merchants
    • Inworld Employment
    • Wanted
  • Land Forum
    • General Discussion
    • Mainland
    • Regions for Sale: Full Private Island
    • Region for Rent: Full Private Island
    • Regions for Sale: Homesteads
    • Region Rentals: Homestead
    • Parcels for Sale: Mainland
    • Parcels for Rent: Mainland
    • Wanted: Full Private Island
    • Wanted: Homesteads
    • Wanted: Mainland
  • International Forum
    • Deutsches Forum
    • Foro en español
    • Forum in italiano
    • Forum français
    • 日本語フォーラム
    • 한국어 포럼
    • Fórum em português
    • Forum polskie
    • المنتدى العربي
    • Türkçe Forum
    • Форум по-русски
  • Adult Content Forum
    • Highlight Upcoming Events
    • General Discussion
    • General Announcements
  • Answers
    • Abuse and Griefing
    • Account
    • Avatar
    • Creation
    • Inventory
    • Getting Started
    • Controls
    • Land
    • Linden Dollars (L$)
    • Shopping
    • Technical
    • Viewers
    • Everything Else
    • International Answers

Blogs

  • Commerce
  • Grid Status Update
  • Featured News
  • Inworld
  • Tools and Technology
  • Tips and Tricks
  • Land
  • Second Life Pic of the Day 08.10.2017

Categories

  • English
  • Deutsch
  • Français
  • Español
  • Português
  • 日本語
  • Italiano
  • Pусский
  • Türkçe

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 135 results

  1. Hello folks, As the title say, i'm looking to be hired as scripter. I know well the Linden Scripting Language (LSL) and many others (especially web languages like PHP, HTML5, ASP.NET with MVC, JavaScript, NodeJS, Angular). If you need, i can also create projects in: C, C++, C#, Delphi, Perl, Python... I have many customers in SL (since approx 3 years) for custom full permissions LSL scripts mainly. I'm available for any small or mediums projects. I speak mainly French but i'm able to tchat in English (No english voice). I'm also good for security and hacking if you need these types of skills. If you are interested to work together, you can contact me directly in-world (UnderFawkes Resident).
  2. Hello i am looking for someone to create a few scripts for me as well as a few small builds for a business i'm wanting to create. If intetested plz plz comment below or send me a dm r notecard inworld @mzcdropz. Plz and Thank U.
  3. testgenord1

    Jigsaw Puzzle

    Hi! Another user was so kind to make a bilingual vocabulary memory game for me once: Two matching words in the respective two languages must be matched by clicking them. When the two words match, one of the two is moved on top of the other one. The game is here: https://forums.osgrid.org/viewtopic.php?f=5&t=6116 On the basis of that script I think it should be possible to make a jiggsaw puzzle. It can already be done through the above mentioned script: One piece is the actual puzzle piece, with a texture of a piece from a photo /text /painting etc. The other piece lies on the ground as a background for that picture, with no texture. Several of these background pieces lie next to each other on the ground. The script of each background piece matches one of the puzzle pieces. When the two to matching ones are clicked, the puzzle piece is moved onto its corresponding background piece, and thus, it is in the correct place. This is repeated with all other puzzle pieces until the puzzle is finished. The problem is the following: This makes it possible to randomly click pieces together, without thinking. What I would like to have is this: Each puzzle piece can be matched with each background piece and no correct solution is given in the script. When a piece is clicked a second time, it moves back to its original position. This means the player must solve the puzzle through looking and thinking, like a normal jigsaw puzzle. Do you maybe have any ideas for this? There might also be completely different approaches for this. Thank you very much in advance!
  4. MIVIMEX

    Show/hide objects by HUD :: wanted

    Hello! Need a script for three-button HUD to make one of the objects in the linkset visible. Reward 1000 Ls.
  5. Hello! Please help to make a script for three button HUD to make one of the objects in the linkset visible. Thanks for any help! Im noob to scripting and already posted at wanted too, please pardon for double post! Very needed!
  6. Hello! I need a script for the animal, so that it move freely, wandered along one plane. (Did not fly!) With certain limits. Please, advise something! Thank you!
  7. Hello! I build a seaplane, but it takes off very shortly (I can takeoff even at the first gear (10% throttle) ) and quickly loses altitude even at top speed, it does not hold altitude, I have to constantly raise it, pitch, I made such parameters that it was possible to make a loop and roll. But how can I keep the ability to do tricks (stunts?), and make takeoff and landing more smooth and keep altitude for longer? llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_TIMESCALE, 1.50); llSetVehicleFloatParam(VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 10.0); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_TIMESCALE, 7); llSetVehicleFloatParam(VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 3); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1.00); llSetVehicleFloatParam(VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.50); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 1.00); llSetVehicleFloatParam(VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 1.00); llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.20); llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 5.00); llSetVehicleFloatParam(VEHICLE_BANKING_MIX, 0.70); llSetVehicleFloatParam(VEHICLE_BANKING_EFFICIENCY, 1.00); llSetVehicleFloatParam(VEHICLE_BANKING_TIMESCALE, 2.00); llSetVehicleFloatParam(VEHICLE_HOVER_HEIGHT, 0.00 ); llSetVehicleFloatParam(VEHICLE_HOVER_EFFICIENCY, 0.50 ); llSetVehicleFloatParam(VEHICLE_HOVER_TIMESCALE, 2.00 ); llSetVehicleFloatParam(VEHICLE_BUOYANCY, 1 ); llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 10.0, 10.0>); llSetVehicleVectorParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, <20.0, 20.0, 20.0>); llRemoveVehicleFlags(-1); llSetVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_CAMERA_DECOUPLED); Also for what these parameters? llSetVehicleVectorParam(VEHICLE_LINEAR_FRICTION_TIMESCALE, <10.0, 10.0, 10.0>); llSetVehicleVectorParam(VEHICLE_ANGULAR_FRICTION_TIMESCALE, <20.0, 20.0, 20.0>); Please help! Thank you so much!
  8. MIVIMEX

    Uneven particle emission

    Hello! I have a question. My seaplane during the movement on water produces foam trace. But the emission goes by impulses, uneven. Help please make the trace smoother and more continuous! Thanks in advance! [PSYS_PART_MAX_AGE,5.00, PSYS_PART_FLAGS, 291, PSYS_PART_START_COLOR, <0.89900, 0.93776, 0.97216>, PSYS_PART_END_COLOR, <0.98706, 0.98044, 0.98756>, PSYS_PART_START_SCALE,<1.00750, 1.00752, 0.00000>, PSYS_PART_END_SCALE,<3.00369, 3.00974, 0.00000>, PSYS_SRC_PATTERN, 4, PSYS_SRC_BURST_RATE,0.00, PSYS_SRC_BURST_PART_COUNT,16, PSYS_SRC_BURST_RADIUS,0.00, PSYS_SRC_BURST_SPEED_MIN,1.00, PSYS_SRC_BURST_SPEED_MAX,1.00, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_MAX_AGE, 0.0, PSYS_SRC_TEXTURE, "013bfffb-d1a5-04e9-d776-67d4ade3b99b", PSYS_PART_START_ALPHA, 1.00, PSYS_PART_END_ALPHA, 0.50]);
  9. GarouGrey

    Textures Via Hud

    I've been searching as best I can for the script used to put into a hud, that allows you to apply a texture to a worn mesh object--- like skins with mesh bodies. I can't seem to track it down. please help!
  10. Hello, does anyone know how to create an automatic Bus script for a roleplay community? This means that the bus will be able to function without an actual avatar and be able to stop at bus stops.
  11. MIVIMEX

    Juggling simulation

    Hi! Question about simulation of juggling. How to make two - three objects to rotate in a circle and whether it is possible at the same time to wear them? Please, help! Thanks in advance!
  12. anyone have the simple boat script that isnt owner only or can edit it out? https://www.outworldz.com/lib/Boat/Boat/Object/Boat_1.lsl
  13. MIVIMEX

    Seaplane floats unstable

    Hello, I build a small seaplane, but when on the water (it floats ok) wings or nose go under the water. On the land all ok. The root is a 0,5 prim cube. Is it script or construction (primmy)? Please help! Thank you! Seaplane is about 3x3 meters
  14. MIVIMEX

    Seaplane Script

    Hello! I'm trying for the first time to build a seaplane and here I got such a script. The script is excellent, the plane flies, but I can not add the ailerons, rudder, flaps. in the script I see these words are encountered. Please help add them. Thanks for any help. // :CATEGORY:Vehicles // :NAME:A_flight_script_with_more_realistic // :AUTHOR:Fritz Kakapo // :CREATED:2010-12-28 21:16:02.003 // :EDITED:2013-09-18 15:38:46 // :ID:8 // :NUM:12 // :REV:1.0 // :WORLD:Second Life // :DESCRIPTION: // My more elaborate airplane and bird scripts are also available free in world, but I suggest that this is the place to start. This scrpt is public domain "Copyleft!". My others are distributed under GNU Free Public Licenses, so only the ideas and short sections of script should be used in proprietary flight scripts, not long sections verbatim. Direct derivatives of the others should remain open source. // // I am anxious for others to use my new methods. I realize that most sl residents don't have strong backgrounds in physical analysis and modeling, numerical methods and real time programming, so I have tried to make this a script that others will be able to use as a starting place and adapt to their own requirements. One can look at the other scripts when ready to add more details and features. // :CODE: //==================================================================================================================================== // PIETENPOL AIR CAMPER FLIGHT SCRIPT MK1, with F. t. C.'s extensive changes // // Portions of this script are influenced by or based on work from Alex Linden, Cubey Terra, Eoin Widget, Kerian Bunin, Ronald Krugman // Script by Ezekiel Bailly 2005-2008 // New, more physical, flight behavior and other changes by Fritz t. Cat (Fritz Kakapo), April--May 2010. // Copyleft! //-------------------------------------------------------------------------------------------------------------------------------------- // Some of Fritz's changes: // Making it act like an airplane, maybe even like a Model A engined Air Camper, // but keeping it simple and as compatible as I can with what other sl flight scripters are doing. // Explaining how this new script relates to the simplified physics of airplanes. // Separated aileron and rudder controls. (The variables controlling the prim angles were already separate.) // Some improvements in response time. // Pulling loose wires. When I was a student, they used to send me up to trace signal cables and remove them if open. // Trying to make it easier for the next person (or robot?) who works on it. // Took out HUD control, for simplicity and efficiency. (Each listen puts a lot of load on the server, or used to at least.) // More concise, clearer and more efficient code. Tables of if statements could be replaced by formulas, for example. // Formatting. I prefer less blank lines, dashes instead. More consistent and standard indenting. // Deleting long obsolete comments, better variable names. // // Wikipedia says stall speed 35 mph, top 100 mph, rate of climb 500 ft/min (152 m/min). // It lists the Model as as 40 horsepower (30 kW), and the Camper loaded weight as 995 lb (452 kg). // Because of sl limitattions, I have modeled that at half speed. // The stall here is not realistic and is too slow, to keep it easy to fly and simple. // Too slow can be fixed by increasing LINEAR_FRICTION_TIMESCALE.z to decrease lift. // The stall is too gentle because of the approximation that the lift is proportional to the angle of incidence // times the square of the speed, which breaks down in a stall because of boundary layer separation. // It would be somewhat improved by making the linear friction increase (LINEAR_FRICTION_TIMESCALE decrease) with speed, // but this is a simple script, and it is easier to fly without that. // // Come the revolution, there'll be no more flying level, just the same, with the wings vertical! // Come the revolution, airplanes will turn toward the low wing, even when up side down! //====================================================================================================================================== // // // *AC control flags that we set later (It won't do logic in the initialization of variables.) integer gAngularControls; // *AC we may keep track of angular history for more responsive turns integer gOldAngularLevel; // Landing Gear Weight on Wheels-Collision Integer integer onground = TRUE; // THROTTLE (SPEED) Sensitive Declarations // Thrust variables: // thrust = forward * thrust_multiplier // Edit the maxThrottle and thrustMultiplier to determine max speed. integer forward = 0; // this changes when pilot uses throttle controls integer maxThrottle = 5; // Number of "clicks" in throttle control. Arbitrary, really. float thrustMultiplier = 11.; // Amount thrust increases per click. // // Lift and speed //float cruiseSpeed = 19.0; // knots, speed at which plane achieves full lift, knots! float speed = 0.; // speed in m/s float requested_timer_interval = 0.5; // timer call requested rate, it can be much slower integer sit = FALSE; // pilot sitting integer ignition = FALSE; // engine running, object physical // // Control Surface Motion Declarations string last_aileron_direction; string cur_aileron_direction; // string last_elevator_direction; string cur_elevator_direction; string last_rudder_direction; string cur_rudder_direction; // // CAMERA DECLARATIONS list drive_cam = [ CAMERA_ACTIVE, TRUE, CAMERA_BEHINDNESS_ANGLE, 0.0, CAMERA_BEHINDNESS_LAG, 0.6, CAMERA_DISTANCE, 10.0,//3.0, CAMERA_PITCH, 10.0, // CAMERA_FOCUS, CAMERA_FOCUS_LAG, 0.05, CAMERA_FOCUS_LOCKED, FALSE, CAMERA_FOCUS_THRESHOLD, 0.0, // CAMERA_POSITION, CAMERA_POSITION_LAG, 0.3, CAMERA_POSITION_LOCKED, FALSE, CAMERA_POSITION_THRESHOLD, 0.0, // CAMERA_FOCUS_OFFSET,<0,0,1>//<0,0,1> ]; integer camon = FALSE; integer camPermed; // key pilot = NULL_KEY; vector angular_motor; // vector global_vel; // velocity in the sim coordinate system vector local_vel; // velocity in the coordinate system pointed as the airplane integer thrustPercent = 0; float ANGULAR_MOTOR_TIMESCALE_0 = 4.; // strength of angular motor and angular damping float VERTICAL_ATTRACTION_TIMESCALE_0 = 17.; //-------------------------------------------------------------------------------------------------------------------------- integer HUDon = TRUE; //"Heads Up Display" variables string HUDtext = ""; vector HUDcolor; //========================================================================================================================== // init() { llListen(0, "", llGetOwner(), "" ); // llSetCameraEyeOffset( < -12, 0., 3.5 > ); // Position of camera, relative to parent. llSetCameraAtOffset( <0, 0, 1.9 > ); // Point to look at, relative to parent. // llSetSitText( "AirCamper" ); // Text that appears in pie menu when you sit // llCollisionSound( "", 0.0 ); // Remove the annoying thump sound from collisions // //SET VEHICLE PARAMETERS -- See www.secondlife.com/badgeo for an explanation llSetVehicleType( VEHICLE_TYPE_AIRPLANE ); // // angular deflection, fin and rudder llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.3 ); llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 1.0 ); // // linear deflection llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0. ); // fuselage lift, both pitch and yaw cause lift llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 1000. ); // but we use LINEAR_FRICTION instead. // // angular friction llSetVehicleVectorParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, < 1.5, 3., 6. > ); // Caused by drag of extremities. // // linear friction llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, < 37., 9., 0.15 > ); // This is the all-important trick to get the physics engine to handle the wing lift. // The x and y components contribute to parasite drag and to fuselage lift. // I have a note card explaining how the dependence of both lift and drag on pitch angle // are accurately and efficiently modeled by this parameter. // (To get a realistic depenence of lift and drag on speed, this parameter should decrease with speed.) // llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> ); // Start with the Model A off. // llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 24. ); // loose control to feel like air llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 10. ); // 20 times the timer interval. // If this is too long, it gets lost between sims more often. If it is too short, it falls in busy sims. // // angular motor llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> ); // control surfaces // llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0/5. ); // strength of " and angular damping // llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 3. ); // can be refreshed in timer or not // // hover llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0. ); // useful for sea planes llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0. ); // or for taking off from bare ground llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000. ); // // vertical attractor // This tends to keep the airplane right side up. // More technically, it gives it dynamic stability against spiral dive. // In rl airplanes, this stability is provided largely by dihedral and by // the vertical distance between the aerodynamic center and the center of gravity. // This vertical attractor is less realistic but simpler than the dihedral approximation I use in Li'l Stinker. llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.1 ); llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, VERTICAL_ATTRACTION_TIMESCALE_0 ); // The /10. is to fix leaning over on ground, probably caused by the lack of a good sit animation. // // banking I don't know much what this does yet, so I am not using it. // Used in a straightforward way, it is partly responsible for the // un-airplanelike behavior of other sl airplanes. // It was obviously not introduced with airplanes in mind (at least not in a rational mind). // (I tried reversing it when up side down, but did not understand the result.) llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 0. ); llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 1000. ); // // Falls half as fast, as though the space and speed were twice as big, // to deal with the small size of sims and the slowness of handoffs between sims. llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0.5 ); // This and must be a constant (for any flight mode). // // default rotation of local frame llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0,0,0,1> ); // A noop, I think. // // remove these flags llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP | VEHICLE_FLAG_HOVER_WATER_ONLY | VEHICLE_FLAG_HOVER_TERRAIN_ONLY | VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT | VEHICLE_FLAG_HOVER_UP_ONLY | VEHICLE_FLAG_LIMIT_MOTOR_UP | VEHICLE_FLAG_CAMERA_DECOUPLED); //----------------------------------------------------------------------------------------------------------------- // gAngularControls = CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT | CONTROL_BACK | CONTROL_FWD; // refreshHUD(); // llSay(0, "Cogito ergo sum." ); // "I think therefore I am.", Descartes. Variant on "Hello world!" // } // End init. // //----------------------------------------------------------------------------------------------------------------------------------- // refreshHUD() // from the VICE test airplane { if ( !sit ) { HUDtext="Take a copy, or buy for l$ 0. \n Full permissions, Revolutionary flight script. Public domain, no restrictions on use. Open the airplane as a box to get the documentation."; HUDcolor = < 0.2, 0.4, 1. >; jump GOTO; } // if ( !HUDon ) { HUDtext=""; jump GOTO; } // HUDtext = "Airpeed: " + (string)llFloor( (local_vel.x + 0.5) ) + " m/s" + " = "+(string)llFloor( ( local_vel.x*1.94 + 0.5 ) ) + " kts." + " = "+(string)llFloor( ( local_vel.x * 100./2.54/12./5280. *60.*60. + 0.5 ) ) + " mi./hr." + "\n " +" = "+(string)llFloor( local_vel.x *100. /2.54/12. /5280. *60.*60. * 2. + 0.5 ) + " scaled mi./hr." + "\n Rate of climb: " + " = " + (string)( llFloor( global_vel.z *100. /2.54 /12. *60. * 2. /10. + 0.5 ) * 10 ) + " scaled foot/min." + "\n " + "Throttle: " + (string)thrustPercent + "%"; // HUDcolor = < 1.0, 1.0, 1.0 >; // white when combat is disabled // @GOTO; // llSetText( "", HUDcolor, 1.0); //llSetText(HUDtext+"\n \n \n \n \n \n \n ", HUDcolor, 1.0); // llMessageLinked( 2, 333, (string)HUDcolor, NULL_KEY ); llMessageLinked( 2, 137, HUDtext+"\n \n \n ", NULL_KEY ); // } // End refreshHUD(). // //----------------------------------------------------------------------------------------------------------------------------------- // default { state_entry() { init(); } // //---------------------------------------------------------------------------------------------------------------------- on_rez(integer num) { llOwnerSay("Welcome to the Pietenpol Air Camper, type 'help' for the manual."); llOwnerSay("These controls can be typed in chat:"); llOwnerSay("Start, stop the engine: 'contact' , 'cutoff' "); //llOwnerSay("Seat position: 'seatup' 'seatdown' (You will need to Re-sit) "); llOwnerSay("'smoke' turns colored smoke off and on."); // llOwnerSay(" "); llOwnerSay( "The arrow keys or a, d work the ailerons."); llOwnerSay( "Shift arrow or shift a, d controls the rudder." ); llOwnerSay( "Up, down arrow or s, w controls the elevator, as usual." ); llOwnerSay( "Page up, down or e, c changes the throttle, as usual." ); llOwnerSay( "For a good turn, start the turn with the ailerons, then continue it with the rudder and elevator." ); llOwnerSay( "But the elevator and ailerons don't work at the same time as the rudder, sorry." ); llOwnerSay( "Use full throttle for take off." ); // init(); } // // DETECT AV SITTING/UNSITTING AND TAKE CONTROLS //----------------------------------------------------------------------------------------------------------------------------------- changed( integer change ) { // if ( change & CHANGED_LINK ) { pilot = llAvatarOnSitTarget(); // if ( pilot ) { if ( pilot != llGetOwner() ) //if ( FALSE ) { // only the owner can use this vehicle llWhisper(0, "Please take a copy of this airplane and fly your own copy. (If it is not set \"free to copy\" or \"for sale 0 l$\" contact the owner or the creator.) You aren't the owner -- only the owner can fly this plane."); llUnSit( pilot ); //llPushObject(pilot, <0,0,10>, ZERO_VECTOR, FALSE); } else { // Pilot sits on vehicle llRequestPermissions(pilot, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION | PERMISSION_CONTROL_CAMERA); llSetTimerEvent( requested_timer_interval ); llMessageLinked( LINK_SET, 0, "seated", "" ); llMessageLinked( LINK_ALL_CHILDREN , 0, "CONTROLS_FLYING", NULL_KEY ); sit = TRUE; forward = 0; thrustPercent = 0; //llSetStatus(STATUS_PHYSICS, TRUE); // llSay(0, "Seated." ); } } // End pilot. // else if ( sit ) // When changed is called with flying and CHANGED_LINK, it is usually that the avatar is getting up. { // Pilot is getting up. // llSetStatus( STATUS_PHYSICS, FALSE ); llSetTimerEvent( 0 ); llMessageLinked( LINK_SET, 0, "unseated", "" ); llStopSound(); llReleaseControls(); // llClearCameraParams(); sit = FALSE; // llSay(0, "Unseated." ); // //llPushObject( pilot, <0,0, 10. >, ZERO_VECTOR, FALSE ); << This goes in the pilot seat script. //llSetStatus(STATUS_PHANTOM, TRUE); // It falls through the floor. //llSleep(4.0); //llSetStatus(STATUS_PHANTOM, FALSE ); // } // End sit. else llSay(0, "??" ); // for debugging } refreshHUD(); // } // End changed. // //------------------------------------------------------------------------------------------------------------------------ //CHECK PERMISSIONS AND TAKE CONTROLS run_time_permissions( integer perm ) { if ( perm & PERMISSION_TAKE_CONTROLS ) { llTakeControls( CONTROL_UP | CONTROL_DOWN | CONTROL_FWD | CONTROL_BACK | CONTROL_RIGHT | CONTROL_LEFT | CONTROL_ROT_RIGHT | CONTROL_ROT_LEFT // | CONTROL_ML_LBUTTON | CONTROL_LBUTTON , TRUE, FALSE); } } // End run_time_permissions. // //---------------------------------------------------------------------------------------- // listen( integer channel, string name, key id, string message ) { //Aircraft Start Watcher //if( (message == "contact") && (ignition == FALSE) ) if( message == "contact" ) { ignition = TRUE; llOwnerSay( "Starting Engine" ); llSetStatus( STATUS_PHYSICS, TRUE ); llMessageLinked( LINK_SET, 0, "start", NULL_KEY ); //thrustPercent = (integer) llFloor( (float)(forward+1) / (float)maxThrottle * 100. + 0.5 ); } //else if( ( message == "cutoff" ) && (ignition == TRUE) ) else if( message == "cutoff" ) { ignition = FALSE; llOwnerSay( "Engine Stop" ); llSetStatus( STATUS_PHYSICS, FALSE ); llMessageLinked( LINK_SET, 0, "stop", NULL_KEY ); } // else if( (message=="c") && (camon==FALSE) ) // No tested. { llSetCameraParams(drive_cam); camon=TRUE; llOwnerSay("Dynamic Camera on"); } else if( (message=="c") && (camon==TRUE) ) { llClearCameraParams(); camon=FALSE; llOwnerSay("Dynamic Camera off"); } else if( message == "smoke" ) // Added by FtC, because I can't feel the acceleration in the seat of my pants. { llMessageLinked( LINK_SET, 0, "smoke", NULL_KEY ); // (The smoke script starts and stops the smoke with the engine but remembers this command.) } } // End listen. // //---------------------------------------------------------------------------------------- // //FLIGHT CONTROLS control( key id, integer levels, integer edge ) { // OBC DECLARATIONS integer throttle_up = CONTROL_UP; integer throttle_down = CONTROL_DOWN; // // if ( (levels & (throttle_up+throttle_down)) && ignition ) { ////////////// THROTTLE INCREASE //////////////// if ( levels & throttle_up ) { if ( forward < maxThrottle-1 ) { forward += 1; } } // ////////////// THROTTLE DECREASE //////////////// else if ( levels & throttle_down ) { if ( forward > 0 ) { forward -= 1; } } llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, < forward * thrustMultiplier, 0, 0 > ); // // Calculate percent of max throttle and send to child prims as link message thrustPercent = (integer) llFloor( (float)(forward+1) / (float)maxThrottle * 100. + 0.5 ); // llMessageLinked( LINK_SET, thrustPercent, "throttle", "" ); // llOwnerSay( "Throttle at " + (string)thrustPercent + " %" ); // refreshHUD(); // llSleep( 0.15 ); // crappy kludge // This must be to avoid multiple clicks. } // // only change angular motor if the angular levels have changed // if ( (edge & gOldAngularLevel) || (levels & gAngularControls) ) { // This is not fly by wire or fly by light, so the controls work when the pilot is seated. // The fact that they still have some effect at zero speed is an unrealistic convenience. // By the standard simple approximation, both lift and control surface effectiveness are proportional // to the square of the speed. This is a compromise between that and flying ease. // angular_motor = <0,0,0>; cur_aileron_direction = "AILERON_NEUTRAL"; // Start neutral. cur_elevator_direction = "ELEVATOR_NEUTRAL"; cur_rudder_direction = "RUDDER_NEUTRAL"; // // ailerons if( levels & CONTROL_ROT_RIGHT ) { cur_aileron_direction = "AILERON_RIGHT"; angular_motor.x += 2.5 * (0.5 + speed/10.); } // if( levels & CONTROL_ROT_LEFT ) { cur_aileron_direction = "AILERON_LEFT"; angular_motor.x -= 2.5 * (0.5 + speed/10.); } // // rudder if( levels & CONTROL_RIGHT ) { cur_rudder_direction = "RUDDER_RIGHT"; angular_motor.z -= 1.3 * (0.7 + speed/10.); } // if( levels & CONTROL_LEFT ) { cur_rudder_direction = "RUDDER_LEFT"; angular_motor.z += 1.3 * (0.7 + speed/10.); } // // elevator if( levels & CONTROL_BACK ) { // add pitch component ==> causes vehicle lift nose (in local frame) cur_elevator_direction = "ELEVATOR_UP"; angular_motor.y -= 1.2 * (0.7 + speed/10.); } if( levels & CONTROL_FWD ) { cur_elevator_direction = "ELEVATOR_DOWN"; angular_motor.y += 1.2 * (0.7 + speed/10.); } llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor ); // // These are moved from timer to reduce the delay. // if ( cur_aileron_direction != last_aileron_direction ) { llMessageLinked( LINK_ALL_CHILDREN , 0, cur_aileron_direction, NULL_KEY ); last_aileron_direction = cur_aileron_direction; } if ( cur_elevator_direction != last_elevator_direction ) { llMessageLinked( LINK_ALL_CHILDREN , 0, cur_elevator_direction, NULL_KEY ); last_elevator_direction = cur_elevator_direction; } if ( cur_rudder_direction != last_rudder_direction ) { llMessageLinked( LINK_ALL_CHILDREN , 0, cur_rudder_direction, NULL_KEY ); last_rudder_direction = cur_rudder_direction; } // } // End angular controls. // store the angular levels history for the next control callback gOldAngularLevel = levels & gAngularControls; // } // End control. // //---------------------------------------------------------------------------------------------------------------------------- // LAND COLLISION FILTER FOR turn BEHAVIOR // Used now only for unrealistic convenience. // collision_start(integer num_detected) { //llOwnerSay( "Down." ); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0/10. ); // More torque needed on ground. llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, VERTICAL_ATTRACTION_TIMESCALE_0 / 20. ); // The wheel keep us right side up. onground = TRUE; } collision_end(integer num_detected){ //llOwnerSay( "Up." ); //llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0 ); // Less torque needed in air. onground = FALSE; } land_collision_start(vector pos) { //llOwnerSay( "Down." ); llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0/10. ); // More torque needed on ground. llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, VERTICAL_ATTRACTION_TIMESCALE_0 / 20. ); // The wheel keep us right side up. onground = TRUE; } land_collision_end(vector pos) { //llOwnerSay( "Up." ); //llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0 ); // Less torque needed in air. onground = FALSE; } //---------------------------------------------------------------------------------------- //Aircraft Start Watcher // I took this out for efficiency and simplicity. //link_message( integer send, integer num, string msg, key id ) //{ // if(( msg == "contact" ) && (ignition == FALSE)) // { // ignition= TRUE; // llOwnerSay("Starting Engine"); // llSetStatus(STATUS_PHYSICS, TRUE); // } // else if(( msg == "cutoff" ) && (ignition == TRUE) ) // { // ignition = FALSE; // llOwnerSay("Engine Stop"); // llSetStatus(STATUS_PHYSICS, FALSE); // } //} //------------------------------------------------------------------------------------------------------------------------ // timer() { global_vel = llGetVel(); speed = llVecMag( global_vel ); float speed_kt = speed * 1.94384449; // Calculate speed in knots. local_vel = global_vel / llGetRot(); // to coordinate frame alligned with body // llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, < forward*thrustMultiplier, 0, 0 > ); // Keep engine running. llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor ); // Keeps friction constant. // if ( onground ) ; //llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, VERTICAL_ATTRACTION_TIMESCALE_0 / 10. ); else llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, ANGULAR_MOTOR_TIMESCALE_0 / (1.5 + 0.5*speed/10.) ); // More torque needed at higher speed. llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, VERTICAL_ATTRACTION_TIMESCALE_0 / (1.5 + 0.5*speed/10.) ); // Dihedral and wing sweep are more effective at higher speed. // refreshHUD(); // } // End timer. } // End default. // //======================================================================================= //
  15. MIVIMEX

    light script on/off by chat

    Hello! tell me please how should the script of the lighting device look like, which is switched on/off by command in the chat, and illuminates the ambience, but with only one surface glowing? Danke, Muchos gracias, Thanks!
  16. Hello! I have such a wonderful script. It is turned on/off by chat command "ON/OFF". But I need the light to turn on and off on the same command, for example light. You say "light" for the first time and the light turns on. The second time and it turns off. Please help! Thanks for your help in advance! default { state_entry() { key owner = llGetOwner(); llListen(0, "", owner, ""); } listen(integer channel, string name, key id, string message) { if (message == "ON") { llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.4]); } else if (message == "OFF") { llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); } }}
  17. KeliaHomen

    Participative Project Payment?

    Hello, We are actually (some friends scripters and me) trying to define a way to work together, find new customers and be able to deliver more reliable codes in shortest time. Team is the key !!! So we are looking for all opportunities to get customers or new project and an idea came out : Would there be any interest in making a 'kickstarter' like for some SL projects? So I would like to get your feedback about this idea. Thx
  18. MIVIMEX

    UUID Music Player

    Hello! Please help to create a script of a music player that would play ten seconds snippets as loops, each from a notecard or listed in script by UUID, selected from the menu. Please, note, not a full songs but a looped 10 sec snippets. I will be grateful for any help! Thank you!
  19. MIVIMEX

    UUID Music Player Script :wanted:

    Hello! I need someone to create a script of a music player that would play ten seconds snippets as loops, each from a notecard (prefer) or listed in script by UUID, selected from the menu. Also optional slave script. Please, note, not a full songs but a looped 10 sec snippets. Not too pricey please. I can wait. Thank you!
  20. MIVIMEX

    Blood particles script

    Hello! Is it possible to make such a script so that if you put it, for example, in an element of clothing (or even full mesh avatar), so that when shooting and hitting bullets on clothes, blood particles will fly out of it? as a spray. Advise me please, thanks a lot!
  21. JondiDitto

    Touch script not working?

    Why isn't the touch script working? Please, I need help from a scripter ASAP. Here's the snippet: integer setting; float wait; float rand; default { state_entry() { @blink; llSetText((string)setting, <1, 1, 1>, 1); if(setting == 0) { llOffsetTexture(0, 0.2, -1); llOffsetTexture(0, 0.4, -1); wait = 0; rand = llFrand(0.2) + 0.1; while(wait < rand) { wait = wait + 0.25; llOffsetTexture(0, 0.4, -1); } llOffsetTexture(0, 0.2, -1); llOffsetTexture(0, 0, -1); wait = 0; rand = llFrand(8.0); while(wait < rand) { wait = wait + 0.25; llOffsetTexture(0, 0, -1); } } if(setting == 1) { llOffsetTexture(0, 0, -1); } if(setting == 2) { llOffsetTexture(0, 0.4, -1); } if(setting == 3) { llOffsetTexture(0, -0.1, -1); } if(setting == 4) { llOffsetTexture(0, 0.2, -1); } jump blink; } touch(integer total_number) { if(setting == 4) { setting = 0; } else { setting = setting + 1; } llOwnerSay((string)setting); } }
  22. Hey there, so i just started to learn scripting and start with a simple draw/holster script and now trying to put animation in it. actually i managed to insert an animation and work just fine. what i am wondering is is it possible to insert another animation/pose after the first one. so the script goes like this (i tried several option after browsed the wiki and all over internet but still didnt work most of the time the script only run 1 animation.) : integer IsBowie_L = TRUE; integer ChatChan = 0; string DrawCmd = "pull"; string HolsterCmd = "bag"; integer IsVisible; integer hListen; default { state_entry() { llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION); } attach(key id) { if (id != NULL_KEY) { hListen = llListen(ChatChan, "", id, ""); } else { llListenRemove(hListen); } } listen(integer chan, string name, key id, string msg) { if (chan == ChatChan) { if (llToLower(msg) == llToLower(DrawCmd)) { if (IsBowie_L) { if (llGetLinkNumber() == LINK_ROOT) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); else llSetAlpha(1.0, ALL_SIDES); llStartAnimation("dualdrawblades"); } else { if (llGetLinkNumber() == LINK_ROOT) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); else llSetAlpha(0.0, ALL_SIDES); } } else if (llToLower(msg) == llToLower(HolsterCmd)) { if (IsBowie_L) { if (llGetLinkNumber() == LINK_ROOT) llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES); else llSetAlpha(0.0, ALL_SIDES); llStopAnimation("dualdrawblades"); } else { if (llGetLinkNumber() == LINK_ROOT) llSetLinkAlpha(LINK_SET, 1.0, ALL_SIDES); else llSetAlpha(1.0, ALL_SIDES); } } } } } is it possible to add another animation after the first one that already here . Thank you soo much for any input...
  23. MIVIMEX

    Door Script with Lighting

    Hello! I have a question. I'm building a boat and there must be a refrigerator with a door with lighting on/off when door is open/close. I want to add such a lines to script, but I do not know where. Advise please! THANK YOU! LINES TO ADD: /////////////////ON llSetPrimitiveParams([PRIM_POINT_LIGHT,TRUE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.4]); ///////////////// OFF llSetPrimitiveParams([PRIM_POINT_LIGHT,FALSE,<1.0, 1.0, 1.0>,1.0,15,0.750, PRIM_GLOW, ALL_SIDES, 0.0]); DOOR SCRIPT (For vehicles) //------------------------------------------------------ // Timeless Linked Door Script by Timeless Prototype //------------------------------------------------------ // The latest version of this script can always be found // in the Library section of the wiki: // http://www.secondlife.com/badgeo/ // This script is free to use, but whereever it is used // the SCRIPT's permissions MUST be set to: // [x] Next owner can modify // [x] Next owner can copy // [x] Next owner can transfer // [x] Allow anyone to copy // [x] Share with group //------------------------------------------------------ // USAGE INSTRUCTIONS FOR EVERYDAY USE: //------------------------------------------------------ // Say the following commands on channel 0: // 'unlock' - Unlocks all doors in range. // 'lock' - Locks all doors in range and allows // only the permitted users to open it. // To open the door, either Touch it, Walk into it or // say 'open' or say 'close'. //------------------------------------------------------ // USAGE INSTRUCTIONS FOR BUILDERS: //------------------------------------------------------ // 1. Copy and paste this script into the door prim and // change the settings (see further down). // 2. The door prim must be linked to at least one other // prim (could be linked to the house for example). // 3. The door prim MUST NOT be the root prim. // 4. Use Edit Linked Parts to move, rotate and size the // door prim for the closed state. // 5. When ready, stand close to the door and say // '/door closed' (this records the closed door // position, rotation and size to the object's // name and description). // 6. Use the Edit Linked parts to move, rotate and size // the door prim for the opened state. // 7. When ready, stand close to the door and say // '/door opened' (this records the opened door // position, rotation and size). // 8. Once recorded it will not accept these commands // again. If you do need to redo the settings then // delete the Name and Description of the door prim // (these are where the position information is // stored), and then follow the steps above again. // Note: deleting the object name won't save, so set // the object name to 'Object' to reset the object // name. //------------------------------------------------------ // Change these settings to suit your needs. //------------------------------------------------------ // To mute any/all of the sounds set the sound string(s) // to "" (empty string). // To get the UUID of a sound, right click on the sound // in your inventory and choose "Copy Asset UUID", then // paste the UUID in here. string doorOpenSound = "9a076511-9aa8-f50d-e34c-1396a07a66a9"; string doorCloseSound = "876d3492-b8b8-7745-f5ae-dc5176ec6105"; string confirmedSound = "69743cb2-e509-ed4d-4e52-e697dc13d7ac"; string accessDeniedSound = "58da0f9f-42e5-8a8f-ee51-4fac6c247c98"; string doorBellSound = ""; // Setting to empty stops door announcements too. float autoCloseTime = 0.0; // 0 seconds to disable auto close. integer allowGroupToo = TRUE; // Set to FALSE to disallow same group access to door. list allowedAgentUUIDs = ["e032aea2-9489-40d3-87b3-713300ead4cc"]; // Comma-separated, quoted list of avatar UUIDs who are allowed access to this door. integer listenChannel = 0; //------------------------------------------------------ // Leave the rest of the settings alone, these are // handled by the script itself. //------------------------------------------------------ integer isLocked = FALSE; // Only when the door is locked do the permissions apply. integer isOpen = TRUE; vector openPos = ZERO_VECTOR; rotation openRot = ZERO_ROTATION; vector openScale = ZERO_VECTOR; vector closedPos = ZERO_VECTOR; rotation closedRot = ZERO_ROTATION; vector closedScale = ZERO_VECTOR; key openerKey = NULL_KEY; key closerKey = NULL_KEY; integer isSetup = FALSE; integer listenHandle = 0; string avatarName = ""; mySayName(integer channel, string objectName, string message) { string name = llGetObjectName(); llSetObjectName(objectName); llSay(0, "/me " + message); llSetObjectName(name); } mySay(integer channel, string message) { string name = llGetObjectName(); llSetObjectName("Door"); llSay(0, message); llSetObjectName(name); } myOwnerSay(string message) { string name = llGetObjectName(); llSetObjectName("Door"); llOwnerSay(message); llSetObjectName(name); } mySoundConfirmed() { if (confirmedSound != "") { llTriggerSound(confirmedSound, 1.0); } } mySoundAccessDenied() { if (accessDeniedSound != "") { llTriggerSound(accessDeniedSound, 1.0); } } myGetDoorParams() { isSetup = FALSE; if (llSubStringIndex(llGetObjectDesc(), "door;") == 0 && llSubStringIndex(llGetObjectName(), "door;") == 0) { list nameWords = llParseString2List(llGetObjectName(), [";"], []); list descWords = llParseString2List(llGetObjectDesc(), [";"], []); if (llGetListLength(nameWords) != 4 || llGetListLength(descWords) != 4) { myOwnerSay("The door prim's name and/or description has invalid syntax and/or number of parameters. Delete the door prim's name and description and setup the door prim again."); } else { openPos = (vector)llList2String(nameWords, 1); openRot = (rotation)llList2String(nameWords, 2); openScale = (vector)llList2String(nameWords, 3); closedPos = (vector)llList2String(descWords, 1); closedRot = (rotation)llList2String(descWords, 2); closedScale = (vector)llList2String(descWords, 3); isSetup = TRUE; } } } mySetDoorParams(vector openPos, rotation openRot, vector openScale, vector closedPos, rotation closedRot, vector closedScale) { llSetObjectName("door;" + (string)openPos + ";" + (string)openRot + ";" + (string)openScale); llSetObjectDesc("door;" + (string)closedPos + ";" + (string)closedRot + ";" + (string)closedScale); isSetup = TRUE; } integer myPermissionCheck(key id) { integer hasPermission = FALSE; if (isLocked == FALSE) { hasPermission = TRUE; } else if (llGetOwnerKey(id) == llGetOwner()) { hasPermission = TRUE; } else if (allowGroupToo == TRUE && llSameGroup(id)) { hasPermission = TRUE; } else if (llListFindList(allowedAgentUUIDs, [(string)id]) != -1) { hasPermission = TRUE; } return hasPermission; } myOpenDoor() { isOpen = FALSE; myToggleDoor(); } myCloseDoor() { isOpen = TRUE; myToggleDoor(); } myToggleDoor() { if (isSetup == FALSE) { myOwnerSay("The door prim has not been configured yet. Please read the usage instructions in the door script."); } else if (llGetLinkNumber() == 0 || llGetLinkNumber() == 1) { myOwnerSay("The door prim must be linked to at least one other prim and the door prim must not be the root prim"); } else { isOpen = !isOpen; if (isOpen) { if (doorBellSound != "") { llTriggerSound(doorBellSound, 1.0); if (avatarName != "") { mySayName(0, avatarName, "is at the door."); avatarName = ""; } } if (doorOpenSound != "") { llTriggerSound(doorOpenSound, 1.0); } llSetPrimitiveParams([ PRIM_POSITION, openPos, PRIM_ROTATION, ZERO_ROTATION * openRot / llGetRootRotation(), PRIM_SIZE, openScale ]); // Door API. llMessageLinked(LINK_SET, 255, "cmd|door|opened", NULL_KEY); } else { if (doorCloseSound != "") { llTriggerSound(doorCloseSound, 1.0); } llSetPrimitiveParams([ PRIM_POSITION, closedPos, PRIM_ROTATION, ZERO_ROTATION * closedRot / llGetRootRotation(), PRIM_SIZE, closedScale ]); // Door API. llMessageLinked(LINK_SET, 255, "cmd|door|closed", NULL_KEY); } llSetTimerEvent(0.0); if (isOpen == TRUE && autoCloseTime != 0.0) { llSetTimerEvent(autoCloseTime); } } } default { state_entry() { listenHandle = llListen(listenChannel, "", NULL_KEY, ""); myGetDoorParams(); } touch_start(integer total_number) { if (myPermissionCheck(llDetectedKey(0)) == TRUE) { avatarName = llDetectedName(0); myToggleDoor(); } else { mySoundAccessDenied(); } } timer() { myCloseDoor(); } link_message(integer sender_num, integer num, string str, key id) { // Door API. The API is here in case you want to create PIN entry keypads or whatever. if (num == llGetLinkNumber()) { if (str == "cmd|door|doOpen") { myOpenDoor(); } else if (str == "cmd|door|doClose") { myCloseDoor(); } } if (str == "cmd|door|discover") { llMessageLinked(LINK_SET, 255, "cmd|door|discovered|" + (string)llGetKey(), id); } } listen(integer channel, string name, key id, string message) { // Performance note: it's quicker to compare the strings than to compare permissions each time anyone says anything on this channel. if (message == "open") { if (myPermissionCheck(id) == TRUE) { // Only open the door if the person is quite close to this door. openerKey = id; closerKey = NULL_KEY; avatarName = name; llSensor(name, id, AGENT, 5.0, TWO_PI); } else { mySoundAccessDenied(); } } else if (message == "close") { if (myPermissionCheck(id) == TRUE) { openerKey = NULL_KEY; closerKey = id; avatarName = name; // Only close the door if the person is quite close to this door. llSensor(name, id, AGENT, 5.0, TWO_PI); } else { mySoundAccessDenied(); } } else if (message == "lock") { if (myPermissionCheck(id) == TRUE) { isLocked = TRUE; mySoundConfirmed(); } else { mySoundAccessDenied(); } } else if (message == "unlock") { if (myPermissionCheck(id) == TRUE) { isLocked = FALSE; mySoundConfirmed(); } else { mySoundAccessDenied(); } } else if (message == "/door opened" && llSubStringIndex(llGetObjectName(), "door;") == -1) { if (llGetOwnerKey(id) == llGetOwner()) { mySoundConfirmed(); openPos = llGetLocalPos(); openRot = llGetLocalRot(); openScale = llGetScale(); isOpen = TRUE; if (! (closedPos == ZERO_VECTOR && closedRot == ZERO_ROTATION && closedScale == ZERO_VECTOR)) { mySetDoorParams(openPos, openRot, openScale, closedPos, closedRot, closedScale); } } else { mySoundAccessDenied(); } } else if (message == "/door closed" && llSubStringIndex(llGetObjectDesc(), "door;") == -1) { if (llGetOwnerKey(id) == llGetOwner()) { mySoundConfirmed(); closedPos = llGetLocalPos(); closedRot = llGetLocalRot(); closedScale = llGetScale(); isOpen = FALSE; if (! (openPos == ZERO_VECTOR && openRot == ZERO_ROTATION && openScale == ZERO_VECTOR)) { mySetDoorParams(openPos, openRot, openScale, closedPos, closedRot, closedScale); } } else { mySoundAccessDenied(); } } } sensor(integer num_detected) { if (openerKey != NULL_KEY) { integer i; for (i = 0; i < num_detected; i++) { if (llDetectedKey(i) == openerKey && myPermissionCheck(llDetectedKey(i)) == TRUE) { myOpenDoor(); } } openerKey = NULL_KEY; } else { integer i; for (i = 0; i < num_detected; i++) { if (llDetectedKey(i) == closerKey && myPermissionCheck(llDetectedKey(i)) == TRUE) { myCloseDoor(); } } closerKey = NULL_KEY; } } //------------------------------------------------------ // Uncomment the following code if you particularly want // collisions to affect the door state. //------------------------------------------------------ // collision_start(integer num_detected) // { // integer i; // for (i = 0; i < num_detected; i++) // { // if (myPermissionCheck(llDetectedKey(i)) == TRUE) // { // avatarName = llDetectedName(i); // myOpenDoor(); // } // else if (llDetectedType(i) & AGENT) // { // mySoundAccessDenied(); // } // } // } } // End of default state and end of script
  24. I have the free open source smooth rotating door script. It works great. But how can I make it so when touching one door it opens two? Ive had this script in the past but seem to have lost it. So basically it creates double doors that both open when when is touched. Also, I've added a transparent textured mesh 'plane' as the hinge of one door, but when I flip it and use on the other the door opens but then flips upside down!! Anyone else experienced this?
  25. PLEASE NOTE: I figured out a workaround by placing the original touch script in the root -- however, I would still like to know why this didn't work. Thank you. Hello: I need help sorting out this script. I have a listen script that works except for the avatar llDetectedName(0). The list text comes up into chat but Instead of the avatars first name, it returns all 0's. It worked fine as a standalone touch script but I need it to work in a child prim so created a listen script -- and need to have listens to send instructions to other child prime as well. Thank you! This is what pops up in chat: The answer to your question, 00000000-0000-0000-0000-000000000000, is Blah blah blah.. This is the listen script in the child prim: list linesofchat= [ "Blah blah blah.", "Yada yada yada.", "la la la la la la la.", ]; default { state_entry() { llListen( 12345, "", NULL_KEY, "" ); } listen( integer channel, string name, key id, string message ) {if ( message == "motorboat" ) { integer j = llFloor(llFrand(llGetListLength(linesofchat))); string av = llDetectedName(0); av = llList2String(llParseString2List(av,[" "],[""]),0); llSay(0, "The answer to your question, " + av + ", is " + llList2String(linesofchat,j)); } } } This is the call script in the root prim: integer channel = 12345; default { touch_start(integer total_number) { ; llSay(channel,"motorboat"); } }
×