Jump to content

Rolig Loon

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Rolig Loon

  1. Yes, but as written, it will only affect the line immediately after that if statement. You want it ti apply to everything in the event, so you need to write touch_start(integer total_number) { if (llDetectedKey(0) == llGetOwner()) { then every single thing that's already in the touch_start event, and then } } Brackets are important. EDIT: Or do what Wulfie suggested.
  2. llDetected* functions can only be used in events that actually detect something., specifically the touch*, collision*, and sensor events. If you put them in the state_entry event, they won't know what to do.
  3. No. If you are not sending cash out of SL, Tilia is not involved. All you are doing is trading L$ for USD with other residents. I don't remember ever sending cash out of SL; my USD balance comes entirely from in-world business. I have been in SL for over 14 years, paying monthly land fees to LL from my USD balance, and Tilia has never had anything to do with it.
  4. Or timer() { integer typing = llGetAgentInfo(llGetOwner() & AGENT_TYPING); if (typing) { if (!on) { on = TRUE; if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) { llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION,0)); } } } else { if (on) { on = FALSE; if(llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION,0)); } }
  5. The unspoken assumption, of course, is that all people who will be likely to look at the script later have the same level of scripting expertise. I do not need to leave many detailed comments in a script that will only been seen by fairly sophisticated scripters. They will be able to read my code and understand it without verbose comments. If I am writing a script for a client who may need to make his own small modifications later, but is only moderately skilled, he'll need more guidance. So I'll add more notes. I'll also add more notes if it's likely that a talented scripter -- even me -
  6. Create a global integer flag(call it iType maybe) to keep track of whether typing has already started. In your first if test in the timer event, start the looping anim and set the flag to TRUE when typing starts. Otherwise leave it FALSE. Set iType to FALSE in the second if test and stop the anim when you sense that the agent has stopped typing. On successive passes through the timer event, that first if test will always tell you whether the anim needs to be restarted or can be left unstarted.
  7. Try llGetObjectDetails(kObjectKey, [OBJECT_GROUP]);
  8. Yeah, that's always a possibility. LL doesn't like money laundering. And yes, Still, it's all of L$20 -- 8 cents in USD. Hardly worth fretting over.
  9. Don't ask questions. Just take the money and run. If some nice person gave me a gift worth 8 cents, that's what I would do.
  10. So, just save it as a global variable.
  11. Call the Business Office. The billing team is available from 6am to 2pm PST, Monday through Friday. Call toll-free in the US/Canada: 800-294-1067 or 703-286-6277
  12. It's not Newton-Raphson, but it's effective. I like it. You're right. There's always a balance between providing an answer to an immediate problem and diving deep to understand principles that will help make sense of future problems. We have to do both. Over the years, I think this forum has done a good job of helping newbie scripters figure out how LSL works, and it has teased a few of us to stretch and discover things that we never suspected were possible. I would not like to see us overbalance too far in either direction. Personally, I resist the temptation to simply hand out fre
  13. Thanks, @Quistessa . I haven't checked this forum in a few days, so I missed seeing Stephanie's note. Yeah, each time the Lab has changed forum software, scripts have been messed up here. Thanks for doing the manual editing to get that script looking good again.
  14. It isn't enough to just have a PayPal account or a credit card. A PayPal account has to be verified (by PayPal) so that they can guarantee to Linden Lab that you have a dependable source of backup funds. A credit card has to be one of the approved types, and should not be a debit card or a prepaid card of any kind. That's the sort of information you get from the Knowledge Base article that you referenced above.
  15. Me too. Brains don't work well in 4D quaternion space. Angles make a whole lot more sense, especially if they are in degrees. So, I didn't really mean "ignore" except in the sense that the script -- which does work well in 4D space -- doesn't need to know the "angle" information.
  16. Perhaps another way to think about vectors and rotations is to notice that we can never talk about where something is without also saying that its position is relative to something else. I can't tell you where my home is without also telling you implicitly that it is roughly 600 miles west of New York City or by giving you my home's longitude and latitude (which define a position relative to the north pole and the standard meridian). The tree in my front yard is leaning, relative to the straight up and down orientation of any normal God-fearing tree. In SL, we can define a regional posi
  17. Actually, they are exactly what you needed, and they do fit. Your local position vectors in each case are in the form <x,y,z> and the local rotation quaternions are in the form <x,y,z,s>, which is precisely the form that Prof's handy script spit out for you. (Ignore the final value -- the "angle" -- in each case. It's interesting but you don't really need it here.) So just plug the vectors and quaternions that you just discovered into Prof's second script and you're done.
  18. Yes, quaternion notation is a new concept for many people. It takes new scripters a while to understand the difference between a vector and a quaternion. I suspect that most of us end up using llEuler2Rot and llRot2Euler much of the time rather than dealing directly with the math of a quaternion. If you are truly interested, take a look at this very nice video lesson: When it comes to using rotations, Innula is right that although it's not quite correct to say that "*" means "translate by this rotation". You really are multiplying, but not in the way that you normall
  19. I think that's what I appreciated about Void's participation in this forum years ago. Her coding could be terse and certainly idiosyncratic, but it forced me to think carefully about alternative ways of framing a problem. I think we all have a tendency to use the same code snippets over and over again; a toolbox of trusted functions saves time and can reduce errors. On the other hand, familiarity can close our minds to approaches that might save memory, result in faster scripts, or simply be more appropriate to a particular task. There's a lot to be said for thinking of many ways to skin a ca
  20. I concede the point, having lost sight of the difference between coming at the problem as a builder and approaching it as a scripter. I do that more often than I admit. As a scripter, I am drawn by the challenge of understanding what's involved in rotating parts of a randomly-oriented complex object. As a builder, I would almost certainly be moved by the challenge of getting the damned lid to open and close properly. There's room for both perspectives. I think you can see why I chose a career in the sciences rather than becoming an engineer, though.
  21. Oh, I don't know. It depends on your personality. As a veteran puzzle addict, I find confusion quite helpful. It focuses my brain, making me search for deep patterns and principles that will make sense out of the chaos. I had the good luck to stumble into LSL scripting and fall under the influence of Void Singer, who would never write a long, verbose function when a terse in-line version would do the trick. I remember spending hours teasing some of her one-liners apart. They were like the innards of a fine Swiss watch -- one of the classic gear and sprocket things, not a modern LED contrap
  22. Funny you should say that, Prof. I am coming into this thread late, having decided to eat breakfast and take a shower first, so one of my first suggestions was going to be getting rid of the hinge. After all, it serves little purpose other than increasing the object's L.I. You make a good point, though. Your approach -- hard-coding the positions and rotations of all links in an object in both its open and closed positions -- saves a lot of work and is universally applicable. It has the major disadvantage of being totally empirical, teaching nothing about how rotations work, but it will prod
  23. More correctly, yes, some people have been able to use a prepaid Visa card to buy L$, but it is by no means guaranteed. The basic message from L:inden Lab, which I quoted above, is their own cautionary advice.
  24. And you are making an improper comparison in You should be asking else if (total_noughts == total_ones)
  • Create New...