Nikole Messmer Posted February 11, 2021 Share Posted February 11, 2021 1 - probably super easy and I"m probably just dumb for not seeing it on mp already.... but i want a sim-wide radar that has total count, standard names (not display), distance, if they're sat/typing/running/etc, and to show at least like 18-20 in the list. color of the text doesnt matter really. would be super great if it announced chat range enters but also not necessary since viewer settings can do that. here's a picture of what i'm after. my current one is part of a far bigger hud and I don't use a single thing in it, so i'm trying to cut down script use with a new radar. https://gyazo.com/ab083e32d0ac222ad964d3955dc26c23 2 - i'm trying to get an avatar-attached object to float/bob in the air but I'm failing miserably lol. i tried to put in a mp-bought script and when rezzed it will bob up and down like i want but once i add the object to my avatar center from inventory, it sits WAY off to the left of me, I cant reposition it (it bounces right back where it was) and it doesnt bob at all. maybe i need a special kind of script? Link to comment Share on other sites More sharing options...
Quistess Alpha Posted February 11, 2021 Share Posted February 11, 2021 (edited) Your first thing seems rather doable, but I can't imagine there isn't something like that floating around somewhere already. as for number 2, you need a different kind of script for floating attachments than for stand alone objects I'm afraid. It's rather simple but you could try something like: integer LINK=LINK_ALL_OTHERS; // link number of prims to float. float step_length = 0.003; integer step_count = 3; float wait = 0.2; float pause = 0.4; /* end configurable options*/ integer up; default { state_entry() { llSetTimerEvent((wait*step_count)+pause); } timer() { if(up) { integer Index=0; while(++Index<=step_count) { llSetLinkPrimitiveParamsFast(LINK,[PRIM_POS_LOCAL,<0,0,Index*step_length>]); llSleep(wait); } up=FALSE; }else { integer Index=step_count; while(--Index>=0) { llSetLinkPrimitiveParamsFast(LINK,[PRIM_POS_LOCAL,<0,0,Index*step_length>]); llSleep(wait); } up=TRUE; } } } put in an invisible prim linked as the root prim of your object. Edited February 11, 2021 by Quistessa Found minor error, and don't want to publicly embarras myself :P Link to comment Share on other sites More sharing options...
Nikole Messmer Posted February 11, 2021 Author Share Posted February 11, 2021 Thanks! I will try this script later today. The radar is pretty basic so you would think it does exist... but it seems all the ones I find on MP are some combination of the features I want, but none have all of them. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted February 11, 2021 Share Posted February 11, 2021 Why do you need a scripted radar? Most if not all viewers have one built-in. I can post a script that does exactly what you showed in a little bit, I'm just curious about why. Link to comment Share on other sites More sharing options...
Nikole Messmer Posted February 11, 2021 Author Share Posted February 11, 2021 personal preference. i like the transparent list in my corner showing all the things mentioned. To my knowledge viewers dont have that; its just the "people" window which is big and obtrusive. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted February 12, 2021 Share Posted February 12, 2021 (edited) 13 hours ago, Nikole Messmer said: personal preference. i like the transparent list in my corner showing all the things mentioned. To my knowledge viewers dont have that; its just the "people" window which is big and obtrusive. That's fair. Sorry it took a while, I got distracted with other stuff and fell asleep: The script below will show as many closest avatars as will fit in the hovertext (254 characters) and they'll be in the format "Wulfie Reanimator (12m)". default { state_entry() { llSetTimerEvent(5); } timer() { list avatars = llGetAgentList(AGENT_LIST_REGION, []); integer list_length = llGetListLength(avatars); list sorted_avatars; key avatar_key; vector avatar_position; integer avatar_distance; vector my_position = llGetPos(); key my_key = llGetOwner(); // Calculate the distance for each avatar in the sim. // Add them into a list in the format [distance, name] integer i; for (i = 0; i < list_length; ++i) { avatar_key = llList2Key(avatars, i); if (avatar_key != my_key) { avatar_position = llList2Vector(llGetObjectDetails(avatar_key, (list)OBJECT_POS), 0); avatar_distance = llCeil(llVecDist(my_position, avatar_position)); sorted_avatars += [avatar_distance, llKey2Name(avatar_key)]; } } // Actually sort the avatars. sorted_avatars = llListSort(sorted_avatars, 2, TRUE); list_length = llGetListLength(sorted_avatars); string display; string new_line; string avatar_name; // Create a string for each avatar. // If the string doesn't exceed the max length of llSetText, // add the avatar to the final display-string. for (i = 0; i < list_length; i += 2) { avatar_distance = llList2Integer(sorted_avatars, i); avatar_name = llList2String(sorted_avatars, i + 1); new_line = avatar_name + " (" + (string)avatar_distance + "m)"; if (llStringLength(display) + llStringLength(new_line) <= 254) { display += new_line + "\n"; } else { jump loop_end; } } @loop_end; // Show the final list of avatars. llSetText(display, <1,1,1>, 1); } } Edited February 12, 2021 by Wulfie Reanimator 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted February 12, 2021 Share Posted February 12, 2021 You could also add a call in there to http://wiki.secondlife.com/wiki/LlGetAgentInfo to get the flying/running/walking state. but I'm a tad lazy. Link to comment Share on other sites More sharing options...
Nikole Messmer Posted February 12, 2021 Author Share Posted February 12, 2021 (edited) 1 hour ago, Quistessa said: You could also add a call in there to http://wiki.secondlife.com/wiki/LlGetAgentInfo to get the flying/running/walking state. but I'm a tad lazy. i do want the state to show as well.... is it hard to add? i have no idea how. 8 hours ago, Wulfie Reanimator said: That's fair. Sorry it took a while, I got distracted with other stuff and fell asleep: The script below will show as many closest avatars as will fit in the hovertext (254 characters) and they'll be in the format "Wulfie Reanimator (12m)". THANK YOU SO MUCH FOR THIS ❤️ Edited February 12, 2021 by Nikole Messmer Link to comment Share on other sites More sharing options...
Nikole Messmer Posted February 12, 2021 Author Share Posted February 12, 2021 actually this script is not working.... it might be something to do with the character count limitation. if there was a way to have it not ay "resident" on the names that might help. and add the line for the sitting/typing/etc status. then it might be perfect. my radar now shows the nearest 20 in the list, but this script shows only like 6 of 18 on-sim. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted February 12, 2021 Share Posted February 12, 2021 (edited) 13 minutes ago, Nikole Messmer said: actually this script is not working.... it might be something to do with the character count limitation. if there was a way to have it not ay "resident" on the names that might help. and add the line for the sitting/typing/etc status. then it might be perfect. my radar now shows the nearest 20 in the list, but this script shows only like 6 of 18 on-sim. Yeah, the character count is the biggest limitation. Having it show more info (or more names in general) would require something a bit more complicated with multiple prims set up in a specific way, which is harder to share here on the forum. I might make a more complete version (it's not difficult, just tedious), but I can't promise anything right now. Edited February 12, 2021 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
Nikole Messmer Posted February 12, 2021 Author Share Posted February 12, 2021 1 minute ago, Wulfie Reanimator said: Yeah, the character count is the biggest limitation. Having it show more info (or more names in general) would require something a big more complicated with multiple prims set up in a specific way, which is harder to share here on the forum. I might make a more complete version (it's not difficult, just tedious), but I can't promise anything right now. I'm not entirely sure, but i might have forgotten to say this is meant to be a hud not a rezzed object. if that makes any difference. like in this photo.. https://gyazo.com/7267b92c02fe42bd6e2e20a6da7dafcc Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted February 12, 2021 Share Posted February 12, 2021 10 minutes ago, Nikole Messmer said: I'm not entirely sure, but i might have forgotten to say this is meant to be a hud not a rezzed object. if that makes any difference. like in this photo.. https://gyazo.com/7267b92c02fe42bd6e2e20a6da7dafcc Yep, I understood that from the first picture. HUDs are still made up of prims/objects, which is what hovertext is attached to. 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted February 12, 2021 Share Posted February 12, 2021 Agreed, not hard, just tedious. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now