Jump to content

Miguelito Shilova

Resident
  • Posts

    98
  • Joined

  • Last visited

Everything posted by Miguelito Shilova

  1. I am working on a foilboard (it's like a surfboard) and using a basic boat script, found here ... What I am having difficulty with is figuring out how to trigger multiple poses when the user is operating the foilboard. There is a default 'crouching' pose and three others. I have been trying to call the poses during the control event, so that when a user presses the FWD, CONTROL_LEFT or CONTROL_RIGHT, a corresponding pose is applied to the user. What I'm looking to have happen is that when the user selects 'Ride' the crouching pose is applied. When driving forward, the avi is shown standing, as well as leaning left when going left, and leaning right when going right. When no control input is given, the avi is returned to the crouching pose. I have the custom poses, but I just need help sorting out the script. Not sure if it's possible, but would also like to be able to adjust the SitTarget for each pose, instead of them all using the same SitTarget. Please let me know if you are interested in helping. Thanks! Mig
  2. It was the nesting issue - wow! Just moved the file to the desktop and it worked like a charm. Felt like my hands were tied. Thanks! Mig
  3. I apologize if this post seems a bit odd, but has anyone noticed SL having issues with .dae mesh files coming from Wings3D? I know some folks out there use it, as have I for a few years. But just recently it seems something has changed. I tried bringing in a .dae file this past week and Model Import tool in SL keeps giving me the 'dae parsing error'. The mesh is clean and has only a 134 polygon count. I also created a simple cube dae file and got the same error. Can anyone tell me if they are aware of problems importing mesh? And how do I find the log that shows the details of the dae parsing error? Really weird how it suddenlty just stopped working. Mig
  4. Not sure how I was able to avoid the import error with spaces, but I guess I got lucky. I decided to delete the center connector and the piece that ran forward of that (the part that was parallel to the pontoons), and apparently that 'heavy handed' approach solved the problem. I used prim replacements for them, and with that change the rest of the hull came in fine: 
  5. Every now and then I will bring in a .dae to SL that when I turn on 'Generate Normals' to smooth out the surfaces, I get these 'added bits' that blow out some of the faces at odd angles. Here's what I'm seeing. This is my latest model (a catamaran hull) as it is supposed to look in SL (I am using Wings3D as my modeling program) ...  I launch SL and go to Upload Model. Here are the LOD settings and if you look at the preview, the model looks nice and clean ...  I turn on 'Generate Normals' and I get the blowout (on the 'starboard' side, fore and aft of the center connector - see the two blowouts?) ...  As far as physics go, I have it to the lowest setting which gives me two triangles - maybe this has something to do with it, but I doubt it - just thought I'd mention it. Has anyone run across this before? If so, do you know what causes it? Is there a solution to fixing it? If I don't use the Generate Normals setting, the pontoons of the model look more like the Hindenburg, with flat, faceted sections and I don't want that. As always, I appreciate the forum's help. -- Mig
  6. Project complete - thanks Fox Paragorm for your help!
  7. I'm looking to create a hud that can present depth (in water), speed and direction. For each metric, there needs to be two variable texture prims (e.g., 05 kts, 10 meters, NW). I can create the hud and the textures for the letters and numbers, but I need some help with the script, to include making the displays increment/decriment and tying them to functions for detecting each metric. I can be contacted in-world or via the forum, and look forward to hearing from you. Mig
  8. I am building a boat using the BWind sailing engine (v1.3.7) but the standard pose script isn't quite cutting it for my needs. The main engine script looks at an variable integer called sailingAngle to determine if it's a positive or negative, and based on that value (< or > 0) will use if /else if statements to switch between two animations that either face port or starboard on the boat. The sailingAngle is used to drive other things, primarily the rotation of the sails, boom, etc. The separate pose script just handles the sitting based on an offset and rotation, but the actual seating position on the boat is static - doesn't shift. What I am looking for is a pose script that can handle two avatars (pilot and passenger), that listens for the sailingAngle value to 1) swap the two animations, and 2) shift the sit offset value from one side of the boat to the other, for both avatars. I also suspect that given the BWind engine doesn't 'broadcast' that value, it would need a mod to replace the animation swap with a message, (e.g., "PORT" and "STARBOARD") on a channel that the pose script. Please let me know if you're interested in helping me with this problem. Thanks -- Mig
  9. Hi Maximillan - thanks for your response. I ended up with another solution chosen for me, so the need went away.
  10. Hi All, I'm looking for a script, but I haven't seen it anywhere and honestly I'm surprised. Can someone give me some pointers on a script that if you chat to a particular channel, it captures what was chatted to a notecard in an object? Something where when the object is clicked, a message shows the chat channel and directs them to chat to it. As always, thanks for everyone's help! -- Mig
  11. I am looking to modify the heeling behavior of the BWind engine script in a boat that I am building. The boat has an outrigger on one side ... The BWind has a routine that calculates the heel angle and then 'rolls' the boat to the leeward side (the side of the boat opposite the direction of the wind). In a regular keel boat this heel angle is the same on either side of the boat, but what I'm looking to have happen is that if the outrigger is on the leeward side, the heel angle is almost nothing - given in RL the bouyancy of the outrigger float would keep the boat sailing 'flat', however if the outrigger is on the windward side, the heel would be normal, the boat rolls to leeward, and the float comes out of the water ... Here is the routine that gets called at runtime, as well as the declarations and initial values ... float windAngle; integer SAIL_UP=FALSE; float maxWindSpeed=14.0; float windSpeed=7.75; float heelTweak=0.55; integer sailingAngle; float heelAngle; float heelTorque; float heelAdd; calcHeelAngle() { heelAngle=llAsin(leftVec.z); if (SAIL_UP) if (llFabs(windAngle+sailingAngle)>3*DEG_TO_RAD) heelTorque=SAIL_UP*llSin(windAngle)*llCos(heelAngle)*PI_BY_TWO*(windSpeed/maxWindSpeed)*llCos(sailingAngle*DEG_TO_RAD)*heelTweak; else heelTorque=0; else heelTorque=0; heelAdd=heelTorque-heelAngle; eulerRot=<heelAdd,0,0>; quatRot=llEuler2Rot(eulerRot); integer SAIL_UP=FALSE;}Does someone have a suggestion or two on how I could modify the routine so that the heelTweak value doesn't exceed .55 when the outrigger is on the leeward side? Much appreciated! Mig
  12. Thanks so much! That worked beautifully! I really do appreciate your help. Mig
  13. Thanks for the reply Innula ... I tried placing the timer () routine in the script and I get a syntax error where it is called ... generalParticleEmitterOn() { llParticleSystem([ PSYS_PART_FLAGS , 0 | PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end | PSYS_PART_FOLLOW_VELOCITY_MASK//Particles are created at the velocity of the emitter ,PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE ,PSYS_SRC_TEXTURE, "f622a6dd-e15d-33f9-a7e5-57504926b1d4" //UUID of the desired particle texture, or inventory name ,PSYS_SRC_MAX_AGE, 0.0 //Time, in seconds, for particles to be emitted. 0 = forever ,PSYS_PART_MAX_AGE, 6.0 //Lifetime, in seconds, that a particle lasts. Original Value = 8 ,PSYS_SRC_BURST_RATE, 0.0 //How long, in seconds, between each emission ,PSYS_SRC_BURST_PART_COUNT, 20 //Number of particles per emission ,PSYS_SRC_BURST_RADIUS, 0.0 //Radius of emission ,PSYS_SRC_BURST_SPEED_MIN, 0.5 //Minimum speed of an emitted particle ,PSYS_SRC_BURST_SPEED_MAX, 0.5 //Maximum speed of an emitted particle ,PSYS_SRC_ACCEL, <0,0,-0.3> //Acceleration of particles each second ,PSYS_PART_START_COLOR, <1.0,1.0,1.0> //Starting RGB color ,PSYS_PART_END_COLOR, <1.0,1.0,1.0> //Ending RGB color, if INTERP_COLOR_MASK is on ,PSYS_PART_START_ALPHA, 0.5 //Starting transparency, 1 is opaque, 0 is transparent. ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency ,PSYS_PART_START_SCALE, <1.0,1.0,0.0> //Starting particle size ,PSYS_PART_END_SCALE, <2.5,2.5,0.0> //Ending particle size, if INTERP_SCALE_MASK is on ,PSYS_SRC_ANGLE_BEGIN, 60.0* DEG_TO_RAD //Inner angle for ANGLE patterns ,PSYS_SRC_ANGLE_END, 120.0* DEG_TO_RAD//Outer angle for ANGLE patterns ,PSYS_SRC_OMEGA, <0.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega() ]); } generalParticleEmitterOff() { llParticleSystem([]); } default { state_entry() { generalParticleEmitterOff(); llSetTimerEvent(.2); } link_message(integer sender_num, integer num, string str, key id) { if(str=="stop") { generalParticleEmitterOff(); } if(str=="start") { timer() { float fGround = llGround(ZERO_VECTOR);//ground level where I am at the moment float fWater = llWater(ZERO_VECTOR); //water level where I am at the moment vector myPos = llGetPos(); //where I am if(fWater>fGround && myPos.z<fWater) { generalParticleEmitterOn(); } } } } }Do I have an extra or missing bracket? I went on the presumption that I should call the timer routine after the if statement for when the message was 'start' Mig
  14. I am having a little bit of trouble with a mod to a particle script. The intent is to have the particle turn on when the prim is at or below water level, and off when above water. The existing script uses messaging to turn on and off based on 'start' and 'stop' messages coming from another script, but what I'm trying to do is add a do / while loop when the message is 'start' ... generalParticleEmitterOn() { llParticleSystem([ PSYS_PART_FLAGS , 0 | PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end | PSYS_PART_FOLLOW_VELOCITY_MASK//Particles are created at the velocity of the emitter ,PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE ,PSYS_SRC_TEXTURE, "f622a6dd-e15d-33f9-a7e5-57504926b1d4" //UUID of the desired particle texture, or inventory name ,PSYS_SRC_MAX_AGE, 0.0 //Time, in seconds, for particles to be emitted. 0 = forever ,PSYS_PART_MAX_AGE, 6.0 //Lifetime, in seconds, that a particle lasts. Original Value = 8 ,PSYS_SRC_BURST_RATE, 0.0 //How long, in seconds, between each emission ,PSYS_SRC_BURST_PART_COUNT, 20 //Number of particles per emission ,PSYS_SRC_BURST_RADIUS, 0.0 //Radius of emission ,PSYS_SRC_BURST_SPEED_MIN, 0.5 //Minimum speed of an emitted particle ,PSYS_SRC_BURST_SPEED_MAX, 0.5 //Maximum speed of an emitted particle ,PSYS_SRC_ACCEL, <0,0,-0.3> //Acceleration of particles each second ,PSYS_PART_START_COLOR, <1.0,1.0,1.0> //Starting RGB color ,PSYS_PART_END_COLOR, <1.0,1.0,1.0> //Ending RGB color, if INTERP_COLOR_MASK is on ,PSYS_PART_START_ALPHA, 0.5 //Starting transparency, 1 is opaque, 0 is transparent. ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency ,PSYS_PART_START_SCALE, <1.0,1.0,0.0> //Starting particle size ,PSYS_PART_END_SCALE, <2.5,2.5,0.0> //Ending particle size, if INTERP_SCALE_MASK is on ,PSYS_SRC_ANGLE_BEGIN, 60.0* DEG_TO_RAD //Inner angle for ANGLE patterns ,PSYS_SRC_ANGLE_END, 120.0* DEG_TO_RAD//Outer angle for ANGLE patterns ,PSYS_SRC_OMEGA, <0.0,0.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega() ]); } generalParticleEmitterOff() { llParticleSystem([]); } default { state_entry() { generalParticleEmitterOff(); } link_message(integer sender_num, integer num, string str, key id) { vector pos = llGetPos(); //Gets your Current position in world float water = llWater(<0,0,19>); // Water height in the current Sim if(str=="stop") { generalParticleEmitterOff(); } if(str=="start") { do { generalParticleEmitterOn(); } while (pos.z <= water); } } }The 'start' and 'stop' appear to work fine, however the do / while isn't recognizing the water height, and not shutting off the effect when the prim is above water. I'm not sure why. Thanks in advance for the help! Mig
  15. Thank you Ohjiro. I will try this out and see if I can make it work for my needs!
  16. Thank you Dora. By the way, I am using your boat swing script in my build and I really like it. Thanks for making it available for boat builders!
  17. I would consider purchasing a script that did this, but I didn't see one in Marketplace (or wasn't looking in the right place) ... I am working on a new boat build, and one of the things I'd like to include is a functional mainsheet - the rope that connects the sail boom to the hull. As to be expected, the boom connects to the mast and swings around it in a wide arc. The mainsheet is about 3/4's of the way aft of the mast, on the boom. The intent is that when the boom swings, the endpoints of the mainsheet 'rope' prim will stay on the same spot of the boom and the hull of the boat - extending and rotating the mainsheet on all three axes. I have seen this done many times on boats, so it's just a matter of understanding how. Can someone offer up some advice on how to tackle this task? Much appreciated! Mig
  18. Hi Rolig, As always, I appreciate all the help you've given me with scripting, including with this whitelist script. I've used it before with a hot tub cover, and it worked beautifully. I am looking to apply the whitelist function to control access to a boat. Might I ask how one could incorporate the functions to work with the pilot sitting and taking controls? Here's how the code currently is written, which currently only works with the owner. I'm pretty what I have below constitutes the relevant functions of the script that handle pilot seating. integer sit; // declares 'sit' as being either 'TRUE' or 'FALSE,' depending on if the pilot is sitting or notkey pilot; // this declares 'pilot' as placeholder for the pilot's UUID key // DETECT AV SITTING/UNSITTING AND GIVE PERMISSIONS changed(integer change) { key agent = llAvatarOnSitTarget(); if(change & CHANGED_LINK) { if (agent == NULL_KEY && sit) { // // Pilot gets out of vehicle // llSetStatus(STATUS_PHYSICS, FALSE); llSetTimerEvent(0.0); sit = FALSE; llMessageLinked(LINK_SET, 0, "throttle", ""); llMessageLinked(LINK_SET, 0, "unseated", ""); llStopSound(); llReleaseControls(); set_motor(); } else if (agent == llGetOwner() && !sit) { // // Pilot gets into vehicle // sit = TRUE; pilot = agent; llSetStatus(STATUS_PHYSICS,TRUE); llRequestPermissions(pilot, PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); llSetTimerEvent(TIMER_DELAY); llMessageLinked(LINK_SET, 0, "seated", ""); } } } Mig
  19. Ah gotcha - and since this converts it to an integer I don't have to worry about rounding it. Cool! Thanks again! EDIT: haha - yep, I'm a fast typer (apparently not the only one ) I presume since it's typecast as an integer, I would not need to round the value, yes? -- Mig
  20. Or if I want to round out the speed integer, could I do this? speed = llRound(llVecMag(local_vec));
  21. Thanks Rolig! Just now a question of syntax. So I would have to declare ... integer speed; float local_vec; and then in the function set it up like ... speed = llVecMag(local_vec); Is that correct? -- Mig
  22. Hi there. I'm working on a speedometer script and I need to convert the velocity vector to an integer. I'm thinking that I can use llGetVel for starters. SLWiki notes that to get the velocity relative the local frame (the direction the object is pointing), divide the output of this function by that of its rotation.," and provides the folloiwing to do that ... vector local_vel = llGetVel() / llGetRot(); If I declare an integer 'number', how can I convert 'local_vel' to an integer that represents the speed in the forward/backward direction? -- Mig
  23. Just an update ... I tried your suggested code adjustment and it worked beautifully. I'll next see what the ramifications are from making adjustments to the notecard without resetting the script. I may have more questions about your hardcode size an position snippet. Thanks! -- Mig
  24. My thanks to all of you! I appreciate everyone's guidance, and helping me better understand the possibilities with LSL. I tried Rolig's approach and it was exaclty what I was looking for - awesome !!! -- Mig
  25. I have a linkset where there is a prim containing a simple menu (llDialog) The menu has a button labeled 'Jets On/Off' that when pressed sends the message 'JETS' out on a defined integer channel. I intend to have another prim in the linkset listen for that message and toggle on / off a particle effect whenever it hears 'JETS', so the particle effect prim needs to keep track of the current on / off state of the particle effect script. That script contains two functions: Bubbles_On() and Bubbles_Off() - the latter simply containing a blank particle effect function (e.g., llParticleSystem([]);) to replace the particle effect with no effect. There's also a sound 'water' that is also to accompany the particle effect. I'm trying to use a default state and an on state to do the toggle. Here's the script (I've removed the particulars of the particle effect since they're not the issue) ... // Particle Effect Declarations // … integer CHANNEL = -321; Bubbles_On() { // llParticleSystem([ … settings … ]); llLoopSound("water", 1.0); } Bubbles_Off() { llParticleSystem([]); // A blank particle system for turning off bubbles llStopSound(); } default { state_entry() { Bubbles_Off(); llPreloadSound("water"); llListen(CHANNEL, "", "", ""); } listen(integer channel, string name, key id, string msg) { if (msg == "JETS") { Bubbles_On(); state default; } else state on; } } state on { listen(integer channel, string name, key id, string msg) { if (msg == "JETS") { Bubbles_Off(); state on; } else state default; } } The script above compiles successfully, and on rez the particle efffect is off in its prim When the button in the menu prim is pressed, the particle effect starts, however when the button is pressed again the particle effect does not stop. Can someone provide a little guidance on how to set up the toggle? Thanks so much! --Mig
×
×
  • Create New...