Jump to content

Rolig Loon

  • Content Count

  • Joined

  • Last visited

Everything posted by Rolig Loon

  1. You can certainly add a notecard reading function without much trouble but frankly that's overkill. It would be much simpler to just read the price from the object's description field. I would write a simple bit of code for you now but I am out of town and can't script on my cell phone. It's basically a one or two line change, though, so anyone else here can write it for you.
  2. I don't have time now to go back through notes that I took several years ago, but you can start down your own trail by looking at the discussion on llGetAgentSize in the LSL wiki at http://wiki.secondlife.com/wiki/Talk:LlGetAgentSize . IIRC, that's where I started when I was curious about the same thing. I just don't recall right now where the trail went from there.
  3. That's almost certainly true, since I am capturing vSpinAxis with touch_start and there is no other action in the script until you release the mouse button and trigger touch_end. Notice, by the way, that llTargetOmega isn't spinning 100% reliably around that axis. If you click the same face several times, you get slightly different results from llDetectedTouchNormal. The axis is wobbling, or precessing, or something. Still, the curious thing is that it's defined at all. As I said, there are times that it would be very handy to be able to click on an animated object like this and know where your viewer thinks it is and which way it's pointed -- as opposed to where the servers know that it is.
  4. Yeah, that's what it looks like to me too, but I didn't think that was possible. You have to feed llTargetOmega a real vector to rotate around, but I can't think of a reliable way --- or even an unreliable way -- to grab a vector from an object that you only know about client-side. It looks like that's just what this script does, though. This could be handy to know about in some applications.
  5. Dancing in a friend's island hideaway. The view from here, partway up the slope, is fantastic. I'm not a tropical person, but I could enjoy this for a while.
  6. One of my favorites is Norse Auk. 😊
  7. This would seem to have an obvious answer, and I thought I knew, but now I'm not sure. Here's a test script: vector vSpinAxis; float fHoldTime; default { touch_start(integer total_number) { vSpinAxis = llDetectedTouchNormal(0); // Vector perpendicular to touched face llSay(0, (string)vSpinAxis); float now = llGetTime(); if (now - fHoldTime < 0.3) // User has double-clicked the test object { llResetScript(); //Returns object to its initial orientation } else // User has single clicked the test object { llSetTimerEvent(0.32); } fHoldTime = now; } touch_end(integer num) { llTargetOmega(ZERO_VECTOR,0.0,0.0); // Stop spinning } timer() { llSetTimerEvent(0.0); if (llGetTime()-fHoldTime > 0.3) { llTargetOmega(vSpinAxis,0.5,0.1); // Start llTargetOmega } } } Drop it into a brand new cube prim and click/hold. As long as you keep holding, it will keep spinning around the vector that is perpendicular to the face you are touching. When you let go, it stops. Double click and the cube will pop back to its initial orientation. So, here's the thing..... llTargetOmega is supposed to be spinning the cube client side, so its real orientation doesn't change as far as the LL servers are concerned. That's why resetting the script pops it back to the original orientation. It never left there, really. So.... if that's the case, why does vSpinAxis change if you try spinning the cube around one axis after another? That is, If my cube is in its default orientation (face 1 pointed east, face 0 pointed up), then I would expect that when I click on face 0, it will always tell me that vSpinAxis is <0.0,0.0,1.0>. But if click on another face and then on face 0 again, it doesn't. llDetectedTouchNormal() seems to be returning the perpendicular to the face as we see it. Why? What am I missing?
  8. Whew. Saved by the belle.
  9. Awww... the gods (and goddesses) would be unpleased. Ondine (also spelled Undine) was a nymph, a mythological spirit of the waters. Now that LL has changed the name of her region, she's homeless. Who knows what curses she may cast on Bellisseria mariners now?
  10. That's not quite the right lesson to take away from this, but I am glad that you got the script to work. Now, let me show you an example of the sort of script that will do what you intended, even if it's not exactly what you had in mind ..... integer iChan; // This is a global variable to store the channel number in integer iLsn; // This is a global variable assigned to hold the listen handler's id default { state_entry() { iChan = 4; iLsn = llListen(iChan,"","",""); // Here's a listen handler, initially assigned to iChan = 4 } listen (integer channel, string name, key id, string message) { llSay(0, "This message was received on channel " + (string) iChan); iChan = (integer)llGetSubString(message,0,1); // Grab the first two characters of the message, convert them to an integer, and assign to iChan message = llDeleteSubString(message,0,1); llSay(0,message); // Say only the real text part of the message that was received. llListenRemove(iLsn); // Remove the current listen handler so that the script won't listen on the old value of iChan iLsn = llListen(iChan,"","",""); } } Put this simple script into the Contents of a brand new prim and play with it. Send a message on channel 4 to start. Your message should look something like: 35Here is my first message. When the script hears that message, it should say: "This message was received on channel 4." and then "Here is my first message." Then send another message like the first, but this time on channel 35. Each time you send a new message, the script will grab the first two characters of it and turn them into the number of a new channel. (Edit: A single digit channel should have a leading blank or zero, as in 06.) Now, if you want to learn to write scripts, play with this one and ask yourself questions like "What would happen if I typed something other than a number at the start of the message? And how could I prevent that from happening?"
  11. Kenny, you know better than to post something like this. Submit an Abuse Report with all of the information. And then remove all trace of the person's name and your photo from here before the moderators catch you. You know that's against the forum rules.
  12. Coding in notecards? That seems unnecessarily slow. You should at least be using the LSL editor built into your viewer and coding in a "New Script" in an object somewhere. Even that's a bit awkward, considering the minimal level of debugging messages that it offers. You'll find a good starting list of external editors in the LSL wiki at http://wiki.secondlife.com/wiki/LSL_Alternate_Editors . Personally, I use Sublime Text 3, but every time this question comes up in the forum we get suggestions about the other editors that people prefer. All LSL scripts have a .lsl file extension.
  13. Because you have never opened the channel or, if you have, it's in parts of the script that you are not showing here. You always need to provide an llListen handler to open a new channel. If you don't want to run out of available channels, it's also good form to close a channel that you are no longer using. Again, I suggest reading the examples in the LSL wiki.
  14. The entire remainder of your script, including any llListen statement that actually opens the listen handler so that the script can listen on that channel. I suggest reading in the LSL wiki >>> http://wiki.secondlife.com/wiki/LlListen
  15. Yeah, every once in a while you can get lucky. Linden Lab advises, though, that most debit cards and prepaid cards are incompatible with their system, so don't count on it.
  16. Where were you in January, when I could have used the extra heat? Your timing is off.
  17. Oh, sure. I was just focused on moving the avatar. If you have other prims to move as well, you can move them the same way. In fact, you can combine things slightly to streamline your script (not that it makes much difference to performance, but it is neater...) llSetLinkPrimitiveParamsFast(LINK_SET,[34,2,PRIM_POS_LOCAL, <0.0, move, 0.0>,34,iSelf,PRIM_POS_LOCAL, <0.0, move, 0.5>]); where 34 is the integer equivalent of PRIM_LINK_TARGET.
  18. Um.. in general, yes. In this particular case, the response doesn't look overly snippy. In fact, the OP seems to have taken it in the same lighthearted way that it was offered. The conversation turned south after the next post in the thread, when the topic turned meta, dealing with the difference between didactic and pedantic. I doubt that the OP was put off by any of this. Bemused, perhaps, but probably not made to feel unwelcome. That's just my guess, of course, but I think this was not a thread to hold up as a glaring example of newbie-baiting.
  19. Heh... I like the concept ... a gun mole. Every job site needs a security detail to keep people from stealing stuff and spray painting graffiti on the bulldozers. I wonder if LDPW has muscle on staff?
  20. Da hood is da crumb what drives da car for da boss. Doncha know nuffin'? Are we fully derailed now? 😎
  21. When you sit on anything, you become a child prim of the linkset. Therefore, you can move yourself the same way that you can move any other child prim. state moving { state_entry() { llSetTimerEvent(2.0); iSelf = llGetNumberOfPrims(); // Be sure to declare iSelf as a global integer variable. } timer() { ++tick; move += 2; llSetLinkPrimitiveParamsFast(iSelf, [PRIM_POS_LOCAL, <move, 0.0, 0.0>]); if (tick > 3) { tick = 0; move = 0; llPlaySound("ed124764-705d-d497-167a-182cd9fa2e6c",1.0); llSleep(5.0); state default; } state listening; } } llGetNumberOfPrims() will always yield the link number of the last link that was created ... you. If you are dealing with several seated avatars, it becomes a wee bit trickier, but the game is the same. Keep track of each one in the order in which they are seated.
  22. Yes, I see that myself, having frequented the Answers section of these forums for most of the past 12 years. There's a lot for a newbie to learn, and many places to bump into walls along the way (literally and figuratively). Some "regulars" take delight in adding walls of their own, and I'm sure that some of them occasionally do it without realizing it. At the same time, however, learning the local patois is part of becoming acculturated. I have moved way too many times in my life and have had to learn which parts of town are safe, which neighbor is someone else's sister-in-law or ex, why we don't drive down Main Street on Saturday mornings, what the funny thing called a "chalupa" tastes like, and all the thousands of other little things that the natives know by heart. I can pick up some things from context, but an occasional heads-up from someone who knows better can save time and trouble, even if I feel embarrassed or conspicuous for a moment. It's all part of learning the territory. As a repeat newbie many times, I know that it's important to learn how to play by the local rules, at least until I understand which ones I can ignore safely. On the whole, I find most of the "regulars" here in the forums and in world to be good, thoughtful people. Even humorous. The few louts are conspicuous, and I share your disdain for them.
  • Create New...