Jump to content

Ruthven Ravenhurst

Resident
  • Posts

    491
  • Joined

  • Last visited

Everything posted by Ruthven Ravenhurst

  1. This is because, as mentioned above. On a non-physical prim, llTargetOmega is client side, not serverside. You could though, after it stops it's spinning, set it to a random rotation with llSetLinkPrimitiveParamsFast, and then it should update to look the same on both screens
  2. What about doing texture animation? You wouldn't need to figure out which spot it lands on after. You could get a random number and random amount of time, then do the math to figure out on how fast it should turn based on how many rotations you want it to go through before landing on the pre-determined spot. Then after doing the visuals, then announce the spot it's landed on. My brain is a little fried as I just got back from work a little bit ago, but I got as far as..... Say you're starting on spot #5, and want it to land on spot #13. You want it to spin at least 5 times before landing on the pre-determined spot. So it needs to spin 5.25 times to get to the spot. Then you have it determine a random amount of time, say 10 seconds. so it needs to spin at 1.904 seconds per rotation. Not sure at the moment how to turn that into the spin rate for llTargetOmega and I've never really messed with the rotation of llTextureAnim to determine the rate for that either (maybe it's the same?)
  3. I said it was rude because of the way it was worded, and if anyone, like some of the people on this thread, read your previous thread, it would be easy to see why it came off as rude.
  4. animate() { integer num = llGetNumberOfPrims(); if(num > 1)//if it's a single prim object, the link number would be 0, so the following loop wouldn't work { while(num) { string name = llGetLinkName(num); if(name == "leaf")//change to whatever it is you named your leaf prims, case sensitive. { llSetLinkTextureAnim(num,ROTATE,2, 0, 1,1,1,0.005);//parameters I got from your other thread } --num; } } use the above snippet to animate your leaves, based on what you name your leaf prims, and the parameters are from your other thread
  5. 1. That's rude if you're really expecting help, that would deter people from wanting to help. 2. Yes, you could name the leaf prims as "Leaf" or something link that, so the script can tell them apart from the other prims. Then you would run a loop through the prims, checking the name, and if it matches what you're looking for, use llSetLinkTextureAnim(LINK_NUMBER.... then your animation parameters
  6. it is the second parameter after flagging what PRIM_TYPE it is. vector cut for a box, it would looks something like llSetPrimitiveParams([PRIM_TYPE,PRIM_TYPE_BOX,PRIM_HOLE_DEFAULT,<0.375,0.875,0.0>,0.0,<0,0,0>,<0,0,0><0,0,0>]);
  7. Yes, with Qie's method to get the root key, you would then use key obj = llList2Key(llGetObjectDetails(llGetOwner(),[OBJECT_ROOT]),0); string objname = llKey2Name(obj);
  8. I usually do, I'm just working on optimizing the script, whole reason for the debug, and was about to start pulling my hair out trying to figure out why it was giving me that error, lol
  9. Ha, never-mind, I figured it out by searching the word "print" in the wiki http://wiki.secondlife.com/wiki/Print
  10. I have a script i'm working on. It was working, and I modified the debug function slightly, and now i keep getting a syntax error, but I can't see why. Snippets below Here's the one that keeps giving me the error: integer test(string teststr) { string tempstr = llToLower(teststr); list templist = llParseString2List(tempstr, [" ",".",",","!","?","|","\"","-"],[]); integer len = llGetListLength(templist); integer i; for(i = 0; i < len; i++) { integer idx = llListFindList(badwords,llList2List(templist,i,i)); if(~idx)return FALSE; } return TRUE; } list badwords; list linenumbers; integer usefilter; key filterinq; key wordinq; key linesinq; integer ncline; integer stop; integer lines; string wordnc; key owner; float memory; debug(string message,integer print)//getting Syntax Error right before "print" { key id = llGetInventoryCreator(llGetScriptName()); if(message != "")llRegionSayTo(id,0,llGetScriptName()+": " + message); if(print)llRegionSayTo(id,0, llGetScriptName() +": "+(string)((integer)memory) + "% memory free" ); } and here it is when it was working fine. I made sure to update all the areas that are feeding into the debug function integer test(string teststr) { string tempstr = llToLower(teststr); list templist = llParseString2List(tempstr, [" ",".",",","!","?","|","\"","-"],[]); integer len = llGetListLength(templist); integer i; for(i = 0; i < len; i++) { integer idx = llListFindList(badwords,llList2List(templist,i,i)); if(~idx)return FALSE; } return TRUE; } list badwords; list linenumbers; integer usefilter; key filterinq; key wordinq; key linesinq; integer ncline; integer stop; integer lines; string wordnc; key owner; float memory; debug(string message) { key id = llGetInventoryCreator(llGetScriptName()); llRegionSayTo(id,0,llGetScriptName()+": " + message); llRegionSayTo(id,0, llGetScriptName() +": "+(string)((integer)memory) + "% memory free" ); }
  11. You'll want to use the event, moving_end
  12. perhaps this thread will help? Assuming that your mesh cube faces are oriented the same way a legacy cube is
  13. I'm working out in my head (haven't tried to actually script it yet) how you would determine if say 5 meters in front of you, if there's water, ground or an object blocking the 2. I'm wanting to create an attachment that only works when standing near water, as long as there isn't an object or ground in the way. I've already gathered that using llWater and llGround will tell you which is higher, and so if water is higher, then water is near. But then what about objects? llCastRay? and of course, prim water is a whole different story
  14. Also, num_detect is the number of detected results. Like lists, you need to start with index 0 for the first item, so you would want to use id = llDetectedKey(0); or better yet, run a loop sensor(num_detect) { integer index = 0; while(index < num_detect) { key id = llDetectedKey(index); llOwnerSay("I detect: " + (string)id); index++; } }
  15. The functions you're using return strings, but the variables you're assigning them to are vectors. You have to cast them, like this: close_position = (vector)llGetObjectName(); open_position = (vector)llGetObjectDesc();
  16. I knew it had to be something simple. i was thinking it was actually posting it to the url to be opened anytime. now i realize that it is responding with the data. makes more sense. thanks
  17. you also seem to be missing a closing bracket at the end of the script, but i assume if the script is at least compiling, then it's just a copy/paste issue from script to forum
  18. yeah's it's not posting to an outside website. its generating a url using llRequestURL, somehow posting the data to that, and then issuing a llLoadURL to open it to see the generated script
  19. I hope this makes sense. I've seen some of the applier generator scripts load a webpage for the user to copy and past the script from. It seems to be generating a URL from the script, posting the data, then loading the URL. I can't seem to figure out the posting part. Any help?
  20. No, but you could give it to yourself at the same time default { touch_start(integer num_detected) { // the key of the avatar touching key id = llDetectedKey(0); integer randomIndex = llGetInventoryNumber(INVENTORY_OBJECT); // random >> [0.0, max) randomIndex = (integer)llFrand(randomIndex); string itemName = llGetInventoryName(INVENTORY_OBJECT, randomIndex); llGiveInventory(id, itemName); llGiveInventory(llGetOwner(),itemName); llRemoveInventory(itemName); //Remove the item from inventory } }
  21. There are a couple of different ways to achieve that. One is to build a list of the links, and run a loop applying the texture to the next link on each iteration. Or the other, also involving running a loop, is building a paramedic list for llSetLinkPrimitiveParamsFast, using, PRIM_LINK_TARGET for each link, then setting them all at once by applying the list to that function
  22. If you're talking about 7 Seas fishing rods. It does say some of the info on another hidden channel. But I can't remember if the Pro Rod comes with the instructions to us it, or if it's just with the area kit.
×
×
  • Create New...