Jump to content

Rolig Loon

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Rolig Loon

  1. Define a global variable to carry the value of llDetectedKey(0) to the dataserver event. At the top of your script, before the default event, write, for example key gAV; Then, in the touch_start event, write gAV = llDetectedKey(0); Once gAV is defined and properly loaded that way, you can use it in the dataserver event in place of llDetectedKey(0), which will not work there. The llDetected* functions only work in events that actually detect something.
  2. If your code is sending the correct message when your friend clicks on it, then you can be fairly sure that her age is being calculated correctly, so the problem is likely to be in the information passed to llGiveInventory. The problem is often that an improper UUID has been passed to the llGiveInventory function. This can happen, for instance, if you have failed to capture the target av's UUID in a touch_start or collision_start event and pass it to whatever event the llGiveInventory function is sitting in. One way to track it down is to put llOwnerSay diagnostic statements around the section of the code where you are trying to give inventory and find out what UUID and av name are being used. Check also to be sure that the inventory you are trying to give isn't no copy, and that you have named it appropriately.
  3. Nice. As usual in scripting, there's more than one solution to a problem. If you only need to use the function a couple of times, this one's a good solution. Each use involves querying every single prim in the linkset, though, so if you have to use this function very many times, it ends up doing way too much computation. In that case, it's smarter to query the prims one time and save the results in a list. Checking the list for an index is much faster in the end. One of the challenges in scripting is to find the best solution for the particular situation you are facing. Not always easy. :smileytongue:
  4. Once you have downloaded and installed a viewer, then go HERE to find out how to do things in SL. After that, you're on your own. You can go anywhere you want, meet new friends, and do anything that you find interesting. Welcome aboard. :smileyhappy:
  5. Oh, #$@***! Fixed again. :smileysad: Yeah, I actually considered that doubling back trick for getting rid of the script name but figured that it wasn't worth the extra effort to optimize a bit of code that will execute once on a script reset, especially where saving time is not really important.
  6. if (change & CHANGED_LINK){ gPrimnames = []; integer i; for(i=1;i<=llGetNumberOfPrims();++i) { gPrimnames += [llGetLinkName(i)]; }} Then you can safely query the global list gPrimnames by list index at any time with integer LinkIdx = llListFindList(gPrimnames, [the_link_I_Want]) + 1; to get the number of a named link.
  7. Oh, the list could go on and on. Actually, the biggest reason why it will be a long time before most greeter scripts recognize Display names is simply economics. Most people who use those scripts aren't scripters. They paid someone to create the greeters for them, and they aren't about to pay some else to do it all over again just to accommodate Display Names. Even if they are using freebie greeters, it's a pain to have to replace all of them. Inertia rules in all things.
  8. Nice thoughts, Void. Thanks. I updated the OP, above.
  9. Here's the scenario: You have a box full of goodies that you want to offer people, and you want to make it easy for them to know what's inside. Yes, I know they can always right click and use Open or Edit >> Contents, but you want to save them even that much trouble. This simple little script lists everything in your box in an alphabetized hover text display that shows 8 lines at a time, like a vertical marquee. It even shows what type of item (clothing, script, notecard, ....) each one is. // FLOAT BOX CONTENTS -- Rolig Loon // Lists object contents in hover text, labeled by type // // Hover text has a 254 character limit, so this script rotates the contents list into hover text eight at a time, marquee style list gContents = []; default { state_entry() { list list_types = [INVENTORY_NONE, INVENTORY_TEXTURE, INVENTORY_SOUND, INVENTORY_LANDMARK, INVENTORY_CLOTHING, INVENTORY_OBJECT, INVENTORY_NOTECARD, INVENTORY_SCRIPT, INVENTORY_BODYPART, INVENTORY_ANIMATION, INVENTORY_GESTURE]; list list_names = ["None", "Texture", "Sound", "Landmark", "Clothing", "Object", "Notecard", "Script", "Body Part", "Animation", "Gesture"]; integer i; for (i=0;i<llGetInventoryNumber(INVENTORY_ALL);++i) { string item_name = llGetInventoryName(INVENTORY_ALL,i); if((item_name != llGetScriptName())&& (llGetInventoryType(item_name) != 10)) { integer type_index = llListFindList(list_types,[llGetInventoryType(llGetInventoryName(INVENTORY_ALL,i))]); string type_name = llList2String(list_names, type_index); gContents += type_name + ": " + item_name + "\n "; } } if(llGetListLength(gContents) > 8) { llSetTimerEvent(5.0); } else { llSetText("THIS BOX CONTAINS: \n " + llDumpList2String(gContents,""),<1,1,1>,1.0); } } changed(integer change) { if (change & CHANGED_INVENTORY) { llResetScript(); } } timer() { gContents = llList2List(gContents,1,-1) + llList2String(gContents,0); // Move item 0 to the end of the list list temp = llList2List(gContents,-8,-1); // Display only the last eight items llSetText("THIS BOX CONTAINS: \n " + llDumpList2String(temp,""),<1,1,1>,1.0); } }ETA: Modified with the addition of suggestions by Void Singer. :smileywink: ETA2: And again. That's what I get for editing too fast. :=P
  10. Most scripted objects that you are likely to bump into were created before anyone had even thought of Display names, so they don't know how to recognize one. Also, many of those devices are scripted to recognize when the same visitor returns a second time. That way it doesn't send another annoying greeting or count you twice in its visitor counter. To do that, it needs to look for your real (i.e., Login) name or your UUID because it can't count on a Display name staying the same from one week to the next. Including a Display name as well may use more memory than many greeters can handle. For those and many other reasons, that scripting job is just tricky enough that I suspect it will be a while before many greeters are written to do it right. It will actually be a while before most people see your Display name, after all. :smileywink:
  11. There's nothing in this Scripting Library, as I'm sure you have found by doing a search. There is a good listing of other script libraries and tutorials HERE that you might look at. And of course you should try Marketplace or the Wanted section of the Commerce forums (http://community.secondlife.com/t5/Wanted/bd-p/Wanted). Good luck.
  12. There's nothing in this Scripting Library, as I'm sure you have found by doing a search. There is a fairly comprehensive listing of other script libraries and tutorials HERE that you might look at. And then, of course, there's Marketplace, although you are not likely to find a full perm script there. Other than that, I'd suggest stepping back a bit and practicing your scripting skills with a few simpler projects as you warm up to making a chess game. As you have questions, post them in the Scripting forum (not here) and you'll find people ready to help.
  13. Rolig Loon

    No Object sit

    Dora Gustafson wrote: I fail to see though, how could it be possible to unsit more avatars on an object when this or one of the simple scripts are in it? (They will unsit any avatar trying to sit) Good point. If the sit target is set, then a simple llUnSit(llAvatarOnSitTarget()) should prevent one or more avatars from sitting (unless they are using a viewer that allows the av to override that restriction). I'm stretching to think of a situation where I might want to use Void's method, but it does show a way to handle the unsit without defining a sit target.
  14. Be sure that you have checked the box that says "Send IM to E-mail" in the Communication tab in Preferences (CTRL-P). If it got unchecked for some reason, IMs won't be forwarded. Another possibility is that your messages are capped. From the Knowledge Base: Maximum number of offline messages (involving IMs, inventory offers, group notices and group invitations) received before messages get capped is 25. Senders can't know whether their messages were capped or not.
  15. Dante's idea is pretty good. If you make a sphere about 0.1m in diameter and drop this script in it, you'll have a follower that hovers over your head and covers that pesky dot most of the time. The dot moves up and down a bit as your av changes position, so it doesn't stay a constant distance above your head. If you make the sphere big enough, though, it works well enough. default{ state_entry() { vector pos = llGetPos(); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(0.1); llMoveToTarget(pos,0.4); llSensorRepeat("", llGetOwner(), AGENT, 20.0, PI,1.0); } sensor(integer total_number) { vector pos = llDetectedPos(0); vector offset =<0,0,1.4>; pos+=offset; llMoveToTarget(pos,0.4); } no_sensor() { llDie(); // Self-destruct if the owner can't be found. } } ETA: I should qualify "well enough." If you fly too fast or if you TP away, you'll leave the follower behind. I just added a self-destruct mechanism to the script so you won't end up cluttering space with orphaned followers. :smileyhappy:
  16. Great video! That's handy to have when you file an AR. If you are victimized by this sort of attack in the future, remember to use CTRL - Alt - Shift - + to turn off particles on your own screen. Particles are a client-side effect, so they can't cause the sim's servers to lag but they can overwhelm your own graphics card under some circumstances, causing rendering lag for you or maybe even making you crash. Turning off particles also makes it easier to see where the emitters are, so you can clean up the mess faster.
  17. It's a particle effect, for which you need a fairly simple script. The way to learn (and it really is worth learning) is to visit the Particle Laboratory in world. ( I'd hand you a SLURL but I can't get in world right now to grab one. It's very easy to find in Search, though.) The Particle Laboratory has an impressive array of tutorials. If you dedicate an afternoon to playing with them to see how the various particle parameters work, you'll be all set. You'll also find that they have a nice collection of free sample scripts in their sandbox area. IIRC, there's a flame script among them. So, go play. :smileywink:
  18. You should be able to do it HERE, which can also be reached if you click on Help (above, next to Community) and sort of follow the link from Contact Support.
  19. The Scripting forum is meant as a place for scripters to learn from each other. It's not really a place to look for scripts. If you are looking for someone to write a script for you, the best place to ask is in the Inworld Employment section of the Commerce Forums (http://community.secondlife.com/t5/Inworld-Employment/bd-p/InworldEmployment). If you are looking for a script that already exists, try Marketplace or the LSL Scripting Library (http://community.secondlife.com/t5/LSL-Scripting-Library/bd-p/LSLScriptingLibrary) or the Wanted section of the Commerce forums (http://community.secondlife.com/t5/Wanted/bd-p/Wanted). You will have much better luck.
  20. If you are looking for someone to write a script for you, the best place to ask is in the Inworld Employment section of the Commerce Forums (http://community.secondlife.com/t5/Inworld-Employment/bd-p/InworldEmployment). If you are looking for a script that already exists and can't find it here, try Marketplace or the Wanted section of the Commerce forums (http://community.secondlife.com/t5/Wanted/bd-p/Wanted).
  21. All you really need is a simple poseball script. The work is all done by whatever animation to find. There are a few poseball scripts here in the library, but you'll need to shop in world or in Marketplace for the animation.
  22. OK, forget my earlier post. I just tried this as an experiment. It's not the prettiest particle display in the world, but if you put it in a prim, point its +Z axis forward, and attach it to your av (I attached mine to the stomach), it produces a particle stream that always points away from your av as you turn. Turn it on with /8 ON and off with /8 OFF. default { state_entry() { llListen(8,"",llGetOwner(),""); } listen(integer channel, string name, key id, string msg) { if ( llToUpper(msg) == "OFF") { llParticleSystem( [ ] ); llSetTimerEvent(0.0); } else if (llToUpper(msg) == "ON") { llSetTimerEvent(1.0); } } timer() { llParticleSystem([ PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0), PSYS_PART_START_SCALE, <0.051, 1.0, FALSE>, PSYS_PART_END_SCALE, <0.05, 1.0, FALSE>, PSYS_PART_START_COLOR, <.25,.25,1.0>, PSYS_PART_END_COLOR, <.75,0.00,0.00>, PSYS_PART_START_ALPHA, (float) 1.0, PSYS_PART_END_ALPHA, (float) .5, PSYS_SRC_BURST_PART_COUNT, (integer) 5, PSYS_SRC_BURST_RATE, (float) 0.1, PSYS_PART_MAX_AGE, (float) 0.5, PSYS_SRC_PATTERN, (integer) 8, PSYS_SRC_BURST_SPEED_MIN, (float) 0.00, PSYS_SRC_BURST_SPEED_MAX, (float) 5.0, PSYS_SRC_ANGLE_BEGIN, (float) 0.00 * PI, PSYS_SRC_ANGLE_END, (float) 0.00 * PI, PSYS_SRC_ACCEL, < 20.00, 00.00, 0.0>*llGetRot(), PSYS_PART_FLAGS, (integer) ( 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_EMISSIVE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK )]); } } You could get it to track your movements even closer by speeding up the timer, at the potential cost of some lag.
  23. You might try something like llLookAt(<1.0,0.0,0.0>*llGetRot(),1.0,0.5) If you are updating with a timer as the avatar moves so that the script always has a current value of the av's global rotation to work with, I think the emitter prim ought to track with its +Z axis pointing forward all the time. ETA: That will position the prim. The acceleration applied to particles shouldn't need a rotation correction at all. I think that acceleration is always applied in the local rotation frame of the prim, IIRC. ETA2: Oh, duh. You said this is an attachment. I was thinking it was a follower. An attachment will rotate with your av anyway. No magic needed.
  24. Welcome to Second Life! That's really quite easy to answer. There is no object to Second Life. You are supposed to be doing anything that you want to. Depending on your personal perspective, this is a social networking platform, a creative environment, a role playing platform, .... almost anything. There is no systematic goal and there are no points to be earned, no badges.... I suggest that you spend some time exploring to see what you find. Try looking in the Destination Guide, for example, to see the range of exciting areas in SL. Go shopping, attend an in-world musical event, visit a club, look for educational areas where you can take a class and start learning a creative skill ....... Introduce yurself to people who look interesting. Have fun. :smileyhappy:
  25. There are some reported issues with NVidia graphics cards ( see HERE, for example) that may explain it. I have had the same experience you describe, though, and it's much less drastic than some of the reports of missing body parts that are in JIRAs like that one. Like you, I can sometimes find that a part of my av has gone totally transparent if I have switched windows to check my e-mail or browser. Clicking on the av or doing a quick Ctrl-Alt-R rebake always fixes it instantly. It's a little disconcerting, but so far I have simply ignored it. I suspect that it's another odd connection issue -- squirrels on the line in Topeka or Baltimore, or wherever my signal is routed.
  • Create New...