Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About woogalie

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. It definitely works like that but its only using SL wind. Its not using my boat's wind variables for Bwind or WWC wind to point it correctly. This is why I believe I need to incorporate it into my main boat script using the boat's wind variable instead. But I am a novice and having trouble fitting it in, also modifying it so that it only changes the wind vane prim instead of turning the entire boat. Thanks Rolig Loon
  2. Ok my next scripting challenge is encorporating Dora's windbag script into mine. Here is Dora's Script How can I tell this to change the rotation of a specific linked prim on my boat? Thanks
  3. Woot, I got it. You are right, the main script has the variables in it. So on my main script I added the following. The main script already has places where it tells the prim with the particle script to start and stop. "llMessageLinked(LINK_ALL_CHILDREN , 0, "start", NULL_KEY);" Also at the top of the script I have the following. From when I was trying to play different sounds when sailing faster. Another one solved! Thanks arton Rotaru
  4. Hello! How can I change this script to begin producing particles only when the boat is moving at say 3 knots or faster? Looks super lame when you raise the sails and the particles fly out when your not even moving Here is the wake script I tried something like this, but it does not like it Thanks for reading
  5. Another thing, the changes broke the ability to HOLD the arrow keys up or down to change sheets faster. Will be working on a solution to that next. I fix something, I break something.
  6. SOLVED - Always after I post... lol Ok so here is the code for the control section and you can see the change I made on the bottom to get both key control AND msg control. (This is so that I can use a HUD to also adjust sheet angles) I sure hope my nonsense but also problem solving helps other boat makers in the future. Best, Woogalie.
  7. Hello helpful people! I am back at it on the boat script, trying to add two commands that can be triggered with msg. I need the sheet angles to adjust when I type f or b and I have accomplished this by using the following code in the listen section of the script. But when I add these to the listen section, the CONTROL_FWD and CONTROL_BACK keyboard controls that are further down the script stop working. A few lines down are "spin+" and "spin-" commands and they work just fine in conjunction with CONTROL_UP and CONTROL_DOWN which is boggling me. Take a look below. So Below I am going to quote the control part of the script, the part that decides how up arrow & down arrow control the sheet angle as well ass page down and page up for spinnaker trim. NOTE the spinnaker section at the bottom is SOOOOO basic and it is working with the verbal commands also. The sheet trim just will not work as both up/down arrow AND verbal. Can anyone identify why the Spinnaker pageup/pagedown keys AND the msg spin+ or spin- are both working, but not the msg f and b for the sheet control? Or perhaps a workaround for it? Thanks to all who read and help solve this problem of mine.
  8. OK! I have successfully added a second listener to the script. When I say raise on channel 0, it raises. When I say raise like "/-99 raise" into chat, it raises. Very good! Now I am trying to determine where I need to adjust the scripts so that they also accept commands from my HUD, or the object owner. THANK YOU arton Rotaru and Innula Zenovka for the replies. WELL THAT'S WEIRD......... I went back to SL after submitting this and my HUD works.... wow. I will write a description on what I did with the help of the two above to accomplish this. Thanks again
  9. In my HUD, I have this script and does it look ok? default { //When someone starts touching the prim touch_start(integer num_detected) { llSay(-99, "raise"); } } If this looks fine as my trigger to raise the sails. I then need to figure out how to add the second listener to the script. A search did not find any State_Entry on the script, only the default at the top. Trying to add llListen(0,"",llGetOwner(),""); llListen(-99,"","",""); In different spots but no luck so far. Will keep at it. Thank you!
  10. Hello again, next challenge! I am now going to attempt to make HUD control for my sailboat. I have just one single cube on my HUD for now, and it contains this script: default{ //When someone starts touching the prim touch_start(integer num_detected) { llSay(-99, "raise"); }} I believe the next challenge is adding a listen to the main boat script so that it listens on channel 0 but ALSO on -99. Below I will provide the 2 locations I found when searching "listen". //Section 1 with listen //GENERAL BOAT STARTUP - reset stuff - this resets the script to defaults... you may call this function as needed... startup() { owner=llGetOwner(); llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Z | STATUS_ROTATE_Y,TRUE); llSetStatus(STATUS_PHYSICS,FALSE); llSetStatus(STATUS_PHANTOM,FALSE); llSetStatus(STATUS_BLOCK_GRAB,TRUE); llSetTimerEvent(0); setInitialPosition(); setVehicleParams(); setSitTarget(); getLinkNums(); llMessageLinked(SAIL,1000,"",NULL_KEY); //reset MAINSAIL llMessageLinked(JIB,1000,"",NULL_KEY); //reset JIB llMessageLinked(BOOM,1000,"",NULL_KEY); //reset BOOM llMessageLinked(BOOM2,1000,"",NULL_KEY); //reset BOOM2 llMessageLinked(JIBBOOM,1000,"",NULL_KEY); //reset JIBBOOM llMessageLinked(FURLED,1001,"",NULL_KEY); //reset Furl llMessageLinked(CREWMAN,1001,"",NULL_KEY); // show crewman poseball llMessageLinked(POLE,1000,"",NULL_KEY); // hide & reset pole llMessageLinked(SPINNAKER,1000,"",NULL_KEY); //reset SPINNAKER setCamera(); //apply Camera default setting currSpeed=0; llListen(0,"",owner,""); //listen to boat owner only... llOwnerSay("Ready."); llMessageLinked(LINK_ALL_CHILDREN , 0, "stop", NULL_KEY); } // ------------------------------------- END GLOBAL BOAT EQUATIONS AND FUNCTIONS--- //Section 2 with a listen //////////////////////////////////////////////////////////////////// // MAIN BOAT LISTENER ///////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // YOU BETTER NEVER EDIT THE FOLLWING LINES UNLESS YOU KNOW WHAT TO DO listen(integer channel, string name, key id, string msg) { if (channel==0) { if (owner==id & llAvatarOnSitTarget()==owner) { if (llGetAgentInfo(owner) & AGENT_ON_OBJECT) { if (llGetSubString(msg,0,4)=="sheet") { incr=(integer)llDeleteSubString(msg,0,4); sheetAngle+=incr; if (sheetAngle>90) sheetAngle=90; } //MESSAGE raise - hey we DO want to sail huh? else if (msg=="raise") { llMessageLinked(LINK_ALL_CHILDREN , 0, "start", NULL_KEY); sailing=TRUE; if (!permSet) llRequestPermissions(owner,PERMISSION_TAKE_CONTROLS | PERMISSION_TRIGGER_ANIMATION); permSet=TRUE; llSetStatus(STATUS_PHYSICS,TRUE); raiseSail(); llSetTimerEvent(timerFreq); wTimer="normal"; } else if (msg=="debug") wDebug=1; else if (msg=="t") { wTack=1; llSetTimerEvent(timerFreq/10); wTimer="rapide"; wIndTimer=0; } // SPINNAKER HOIST/DROP else if (msg=="spin" && SPIN_UP) DropSpin(); else if (msg=="spin" && !SPIN_UP) HoistSpin(); //SPINNAKER TRIM else if (msg=="spin+") TrimSpinPlus(); else if (msg=="spin-") TrimSpinMinus(); //GYBE POLE else if (msg=="gybe") { if (SPIN_UP==TRUE) { llMessageLinked(SPINNAKER,1004,"",NULL_KEY); //hoist spinnaker if (-sailingAngle > 0) llMessageLinked(POLE,1003,"",NULL_KEY); if (-sailingAngle < 0) llMessageLinked(POLE,1004,"",NULL_KEY); CurSpin=0; } } //MESSAGE lower - okay now we want physics ON but no sailing... else if (msg=="lower") lowerSail(); else if (msg=="moor") { llMessageLinked(LINK_ALL_CHILDREN , 0, "stop", NULL_KEY); moor(); llSetTimerEvent(0); if (SAIL_UP) lowerSail(); llResetScript(); } //BOAT ID Setter else if (llGetSubString(msg,0,1)=="id") { if (llGetSubString(msg,3,-1)!="off") { idStr=llGetSubString(msg,3,-1); string tmp=boatName+" #"+idStr; llSetObjectName(tmp); llWhisper(0,"New Boat ID :"+tmp); } } //START bbk_helmsman ANIMATION else if (llGetSubString(msg,0,3)=="anim") { if (llGetSubString(msg,5,-1)=="off") { } else if (llGetSubString(msg,5,-1)=="on") { if (permSet) llStartAnimation("bbk_helmsman"); // change thise pose/animation name if needed... } } } } //-------------------------------- END MAIN BOAT LISTENER --- I will be working more on how to solve this in the morning. Have a great day or night if your reading this!
  11. SOLVED! VERY big Thanks to Rachel1206 and Rolig for keeping me at it! I was able to get this to work by simply adding what Rachel1206 suggested as the one-liner. Oh Becky's Bwind BBK - 1-37-44 (Release) script, starting on line 522 you will see: // UPDATE HUD - Main HUD routine and colour management updateHUD() { string dataString; float compass=PI_BY_TWO-zRotAngle; float effcoeff; string rgn = llGetRegionName(); string blank = " "; float efficiency; string ratio; float derivatesheetAngle=sheetAngle; When I added the one-liner that Rachel1206 suggested below the last float, everything worked. The sound clips play their full duration AND they toggle when my boat speed rises or drops between 6 knots speed. Below is how it should look with Rachel1206 awesome one-liners implemented. // UPDATE HUD - Main HUD routine and colour management updateHUD() { string dataString; float compass=PI_BY_TWO-zRotAngle; float effcoeff; string rgn = llGetRegionName(); string blank = " "; float efficiency; string ratio; float derivatesheetAngle=sheetAngle; if (llVecMag(groundSpeed*1.944)<6.0)llLoopSound( "sailing", 1.0); if (llVecMag(groundSpeed*1.944)>6.0)llLoopSound( "planing", 1.0);
  12. Ok someone tell me if this is dumb or what... I added integer tick8 = 8; to my list at top of script then I added the llSetTimerEvent(tick8); to the script and it allows the sound clip to play a decent length before looping but my entire boat operates at an 8 sec interval, pulling sails in/out. I will figure out how to limit how often the sound plays soon, just do what I mean! fTriggerKnotSpeed= llVecMag(groundSpeed*1.944); if (fOldSpeed!=fTriggerKnotSpeed) llSetTimerEvent(tick8); { fOldSpeed= fTriggerKnotSpeed; if (fTriggerKnotSpeed>=6.0) llLoopSound( "planing", 1.0); if (fTriggerKnotSpeed<6.0) llStopSound(); if (fTriggerKnotSpeed<=6.0) llLoopSound( "sailing", 1.0); }
  13. Interesting! Ty Rolig, this provided me something new to understand. Here is what I put and it causes the sounds to layer and build louder as time passes. fTriggerKnotSpeed= llVecMag(groundSpeed*1.944); if (fOldSpeed!=fTriggerKnotSpeed) { fOldSpeed= fTriggerKnotSpeed; if (fTriggerKnotSpeed>=6.0) llTriggerSound( "planing", 1.0); if (fTriggerKnotSpeed<6.0) llStopSound(); if (fTriggerKnotSpeed<=6.0) llTriggerSound( "sailing", 1.0); } I believe the trigger is checking IF the speed is < or> 6 too often, is there a way to limit how often it checks if it should llLoopSound or llTriggerSound?
  14. I was able to fit it into the script and it works. I have two sounds, and they both toggle when greater or lower than 6 knots speed. Wonderful Rachel! Like everything I build in second life, when I solve one problem I find a new one lol, the sound seems to keep looping at 1 second intervals, its definitely playing though! Here is the code I implemented at the end of the updateHUD() section. Now I just gotta figure out how to get it to stop triggering every second and let the sound file loop properly. fTriggerKnotSpeed= llVecMag(groundSpeed*1.944); if (fOldSpeed!=fTriggerKnotSpeed) { fOldSpeed= fTriggerKnotSpeed; if (fTriggerKnotSpeed>=6.0) llLoopSound( "planing", 1.0); if (fTriggerKnotSpeed<6.0) llStopSound(); if (fTriggerKnotSpeed<=6.0) llLoopSound( "sailing", 1.0); } I also defined these variables at the top of the script: float fTriggerKnotSpeed= 0.0; float fOldSpeed= 0.0;
  15. Thank you all so much for the input, even telling me that what I wrote does not compute, seriously! I am going to analyze the script and see if I can adapt what you provided into it this weekend. And hopefully understand it too, TY rachel1206! Will report what I find, it's become a lot of fun learning this stuff.
  • Create New...