Jump to content

Ruthven Ravenhurst

Resident
  • Posts

    491
  • Joined

  • Last visited

Everything posted by Ruthven Ravenhurst

  1. Thanks, I'll try this next time I'm in world. I already got the actual relays, and they take care of checking which is the closest relay to the chatter, and then checks the list of avatars on the parcel and only repeats to the ones that aren't within 20m of the chatter. It's one of the ones in the Library, but I modified it a bit to check if the avatar it's repeating to is within 20m of a relay, instead of some distance from the center of the relays
  2. That's the while loop is in the function to get the lower corner of the parcel. That's not the problem.
  3. I'm trying to generate a list of positions that will be the optimal placement for chat relays across my parcel. I think I have it almost there, but it's generating some vectors that seem to be too close to the previous, and either I can't figure out where to fix it, or my brain is too fried to figure it out vector lower; vector upper; vector start; key parcelid; float offset = 14.14214; integer dialogchan; integer newchan() { integer num = 0; while(num > -2000) { num = (integer)llFrand(−2147483648); } return num; } getlower() { float x = start.x; float tempx = x; while(tempx > 0.0) { tempx -= 4; key id =llList2Key(llGetParcelDetails(<tempx,start.y,start.z>, [PARCEL_DETAILS_ID]),0); if(id == parcelid)x = tempx; } lower.x = x; float y = start.y; float tempy = y; while(tempy > 0.0) { tempy -= 4; key id = llList2Key(llGetParcelDetails(<start.x,tempy,start.z>, [PARCEL_DETAILS_ID]),0); if(id == parcelid)y = tempy; } lower.y = y; lower.z = start.z; } getupper() { float x = start.x; float tempx = x; while(tempx < 256.0) { tempx += 4; key id =llList2Key(llGetParcelDetails(<tempx,start.y,start.z>, [PARCEL_DETAILS_ID]),0); if(id == parcelid)x = tempx; } upper.x = x+3.99; float y = start.y; float tempy = y; while(tempy < 256.0) { tempy += 4; key id = llList2Key(llGetParcelDetails(<start.x,tempy,start.z>, [PARCEL_DETAILS_ID]),0); if(id == parcelid)y = tempy; } upper.y = y+3.99; upper.z = start.z; } list placements = []; generatelist() { vector temp = first; @nextrow; while(temp.x < upper.x) { temp += <offset*2,0,0>; if(temp.x >= upper.x)temp.x = upper.x; if(onparcel(temp)) placements += temp; } if((upper.x-temp.x) > offset) { temp = <upper.x,temp.y,temp.z>; if(onparcel(temp)) placements += [temp]; } if((upper.y-temp.y) > offset) { temp = <first.x,temp.y+(offset*2),temp.z>; if(temp.y > upper.y)temp.y = upper.y; if(onparcel(temp)) placements += temp; jump nextrow; } @repeat; key last = llList2Key(llGetParcelDetails(temp,[PARCEL_DETAILS_ID]),0); if(last != parcelid) { temp = temp-<0.01,0.01,0>; placements = llDeleteSubList(placements,-1,-1); placements += temp; jump repeat; } } integer onparcel(vector vec) { key last = llList2Key(llGetParcelDetails(vec,[PARCEL_DETAILS_ID]),0); return (last == parcelid); } vector first; vector getstart(vector pos) { integer x = (integer)pos.x; if(x < 4){ x = 2;} else if(x > 4){x = x-(x%4);} integer y = (integer)pos.y; if(y < 4){ y = 2;} else if(y > 4){y = y-(y%4);} return <x,y,pos.z>; } default { state_entry() { start = getstart(llGetPos()); parcelid=llList2Key(llGetParcelDetails(start, [PARCEL_DETAILS_ID]),0); getlower(); getupper(); llOwnerSay(llList2CSV([lower,upper])); first = lower + <20,0,0>*llEuler2Rot(<0,0,45>*DEG_TO_RAD); if(onparcel(first)) { placements = [first]; generatelist(); llOwnerSay(llList2CSV(placements)); } else { placements = [start]; } } touch_start(integer total_number) { llSay(0, "Touched."); } } This it the list of positions it's outputting, with the near doubles colored red: <14.142137, 14.142137, 21.405308>, <42.426418, 14.142137, 21.405308>, <70.710701, 14.142137, 21.405308>, <98.994980, 14.142137, 21.405308>, <127.279259, 14.142137, 21.405308>, <127.989998, 14.142137, 21.405308>, <14.142137, 42.426418, 21.405308>, <42.426418, 42.426418, 21.405308>, <70.710701, 42.426418, 21.405308>, <98.994980, 42.426418, 21.405308>, <127.279259, 42.426418, 21.405308>, <127.989998, 42.426418, 21.405308>, <14.142137, 63.990002, 21.405308>, <42.426418, 63.990002, 21.405308>, <70.710701, 63.990002, 21.405308>, <123.999146, 60.000671, 21.405308>
  4. hmm, could combine this with someone's height maybe to be a more unique aura assuming some uuids might result in the same color alone
  5. I don't understand what you mean. How are you turning a UUID into a color?
  6. I did, he told me where he got the beard, but he's not sure of the hair
  7. Hi all, I got the notice from Damien Fate that he will be closing the Fatewear Line this month. FATEwear Subscriber: FATEwear/FATEplay/FATEstep closing sale, 66% off - https://maps.secondlife.com/secondlife/FATEisland/153/51/34 I am in search of the hair/beard worn in one of the product photos and wonder if anyone can help. Thanks
  8. The other option would be to get into bento animations. You could animate one of the bones to move up and down at the desired position. If it needs to move with a non-bento body part, that would need to be included in the animation. For example, to make a ball bounce in the hand. use a wing bone to move the object up and down from the hand, you would need to also animate the hand with it, or at least freeze it in place so the hand will stay in sync with the position of the ball being animated
  9. Maybe as a dialog/text box? The problem with that is, they can get lost in the notifications
  10. Somethiing I noticed today. I first tried llName2Key on an agent I knew wasn't in the region, as it's an old friend that hasn't been online in years. Of course it returned NULL_KEY Then I used llRequestUserKey for the same name. Then when I used llName2Key again, it returned the actual UUID. Thinking maybe it just kept it in the script's memory somewhere (not as a variable) I tried it with 2 seperate scripts. Same thing, it still had the key available for another script only calling llName2Key. Decided to try again on a different name. First called llName2Key, returned NULL_KEY, seperate object and script, called llRequestUserKey, got the UUID, called llName2Key again, got uuid. I suppose the data server temporarily saves that in the sim's script memory for other scripts to be able to call it? How long? would be be of any use? How long does after an avatar leaves the sim can llName2Key return the UUID?
  11. ahha, i figured it out i think. can't say i understand it, but it looks like it's working the way i wanted. list kfm() { list temp = []; vector lastpos = llGetPos(); rotation lastrot = llGetRot(); integer len = llGetListLength(points); integer i; for(i = 0; i < len; i++) { vector nextpos = llList2Vector(points,i); float time = llVecDist(nextpos,lastpos)/3; vector kfmvec = nextpos-lastpos; if(time < mintime)time = mintime; rotation rotbet = llRotBetween(<1,0,0>,llVecNorm(<lastpos.x-nextpos.x,lastpos.y-nextpos.y,0>)); float rottime = llRot2Angle(rotbet)*4;//calculates the angle * 4 to determine how long the rotation should take if(rottime < mintime)rottime = mintime; temp += [ZERO_VECTOR,rotbet/lastrot,rottime];//subtracts the new rotation from the last rot to determine how much to rotate on this from temp += [kfmvec,ZERO_ROTATION,time]; lastpos = nextpos; lastrot = rotbet;//last rot becomes rotation calculated above } return temp;
  12. I have the way points. I need it to figure out at each way point to figure out if it needs to rotate to point towards the next one, and how much. If it needs to, it will stay in position, rotate, then move to the next way point. If it doesn't need to rotate (if the angle is small enough) it will just move on to the next way point without pausing to rotate
  13. They're all the same elevation. I'll take a look at the link you provided and see if that helps
  14. I'm making a KFM object that will move/patrol along waypoints. I'm trying to figure out how to rotate towards the next waypoint before moving forward, and if it even needs to rotate. here's what I have so far, but it's giving me odd looking rotations. I have my avatar sitting on a cube for this test. He should be facing the direction that it is moving, but some of the movements are backwards, while one is moving the correct direction. What am I doing wrong? Is there a simpler way to determine if it needs to rotate? list kfm() { list temp = []; vector lastpos = llGetPos(); integer len = llGetListLength(points); integer i; for(i = 0; i < len; i++) { vector nextpos = llList2Vector(points,i); float dist = llVecDist(nextpos,lastpos)/3; vector kfmvec = nextpos-lastpos; if(dist < mintime)dist = mintime; rotation rotbet = llRotBetween(<1,0,0>,llVecNorm(nextpos-lastpos)); float angle = llRot2Angle(rotbet); if(angle > 0.1) temp += [ZERO_VECTOR,rotbet,1.25]; temp += [kfmvec,ZERO_ROTATION,dist]; lastpos = nextpos; } return temp; }
  15. what you could is have the object giver rez the object, tell the object what to change the description to, and who to give it to. the object can then change the description and request to attach to the recipient essentially giving it to them
  16. This a simple, proof of concept script for retrieving the name of a group that an object is assigned to. To get an avatar's group, you can first grab a uuid of one of their attachments with llGetAttachedList, then pass that too llGetObjectDetails in place of llGetKey() this script retreives the uuid of the object's group, then sends an http request to get the group's info on the SecondLife website. Once it receives the response, it parses out <title> and </title> to get the groups name. some groups use special characters in their name, such as less than and greater than. the html formats those into HTML entities, and llUnescapeURL doesn't know how to convert those. The loop will parse out the entitie names and replace them with the correct character from the list. it's a short list. perhaps someone has a full list of characters that will/will not convert in this case? default { state_entry() { list dets = llGetObjectDetails(llGetKey(),[OBJECT_GROUP]); key uuid = llList2Key(dets,0); llHTTPRequest("http://world.secondlife.com/group/"+(string)uuid,[],""); } http_response(key id, integer status, list data, string body) { list parsed = llParseString2List(body,["<title>","</title>"],[]); string groupname = llList2String(parsed,1); list parsedname = llParseString2List(groupname,[],["&lt;","&rt;","&quote;","&amp;","&cent;","&pound;","&yen;","&euro;","&copy;","&reg;"]); integer len = llGetListLength(parsedname); integer i; list replace = ["&lt;","<","&rt;",">","&quote;","\"","&amp;","&","&cent;","¢","&pound;","£","&yen;","¥","&euro;","€","&copy;","©","&reg;","®"]; for(i = 0;i < len;i++) { string substring = llList2String(parsedname,i); integer idx = llListFindList(replace,[substring]); if(~idx && !(idx%2)) { parsedname = llListReplaceList(parsedname,llList2List(replace,idx+1,idx+1),i,i); } } groupname = llDumpList2String(parsedname,""); llSetText(groupname,<1,0,1>,1.0); } }
  17. Sure, but the op was asking about receiving the messages when away from the sim, so assuming on a sim that the experience isn't used, that wouldn't work
  18. Another way is to use a permanant object dns for the paging system, and each time the hud is attached (gets a new UUID) it can ping the system for the system to pick the latest hud uuid. the system can check your online status, then send an email to your hud, you hud will check for a new email, and create a dialog popup with the message. if you're not online, the system should assume the last hud uuid it received is invalid, and could save the message to send later, or send to an outside email. ETA: Or instead of sending an email to the hud. The paging system could hold the messages, and the hud can ping the system for the messages with httprequest, and the system could respond with the messages. Something like: Paging system requests url and registers it to Silverday. Hud is attached, gets the url from silverday and begins pinging the paging system every 30 seconds or so. Paging system responds with "0 messages" if there are none, hud continues pinging Paging system gets a message, responds to next ping with message count and first message and deletes the message Hud receives message and stops the automatic pinging. Sees how many messages are remaining. Hud displays message as dialog to you. You click "Ok" and the hud then pings the paging system for the next message if there are any remaining When it sees that it has received the last message, it resumes the automatic pinging. silver day is a good object dns server. I use it to link satelitte subscriber units to my main one. i keep the actual list of subscribers in my experience kvp it registers the script url, and then you can do an initial ping to silverday with the permanant url and it will respond with the linden url that you can then use the ping the system more often http://wiki.secondlife.com/wiki/Silverday_ObjectDNS
  19. ok, for it to be facing the same direction, then probably the X axis would do what you want, but you need to change the angle to 180 degrees instead of 90 try this... integer gIntSwing = 180; rotation gRotSwing; default{ state_entry(){ gRotSwing = llEuler2Rot( <(float)gIntSwing * DEG_TO_RAD,0.0,0.0> ); } touch_start(integer total_number){ if(llDetectedLinkNumber(0) == llGetLinkNumber()) { } } touch_end( integer vIntNul ){ if(llDetectedLinkNumber(0) == llGetLinkNumber()) llSetLocalRot( (gRotSwing = (ZERO_ROTATION / gRotSwing)) * llGetLocalRot() ); } }
  20. That's easy enough, I believe in the script that carley posted, you would just change the rotation vector so the rotated axis is Y instead of Z gRotSwing = llEuler2Rot( <0.0, (float)gIntSwing * DEG_TO_RAD,0.0> );
  21. When Sam's hud hear's Tia's, it would then check the creator using the method i mentioned. If it doesn't match then it can respond with "that's not the sim hud" of course, that's only one way of detecting. if Tia got a hold of a mod prim of yours, say from some other object, and then dropped in her cheat script, my method wouldn't work
  22. You could also check the creator of Tia's hud using llGetObjectDetails, and if it doesn't match the creator of Sam's hud, then it's not the same hud
  23. There is actually a sample sign and door with the casperlet package https://wiki.casperdns.com/index.php/CasperLet/Detailed_Setup#DIY_Script_Components
×
×
  • Create New...