Jump to content

Tabris Daxter

Resident
  • Posts

    134
  • Joined

  • Last visited

Everything posted by Tabris Daxter

  1. hi, llCastRay() was "introduced" to replace "physical type" like this for your exact purpose (ie. detecting individual prims or body parts) the example on the wiki can be modified to be used in a weapon (and has been. i did but i'm not releasing the code) if you go the llCastRay() route i would also back it up with a llSensor() call as it's a bit buggy in attachments. then you use a particle bullet. BUT if you ABSOLUTLY want to go with physical bullets, in the bullet i would put a llCastRay() script with a small range (~1m) and the a llRegionSayTo(llOwnerKey(),[stuff]) and do the calcs in a hud just my 2$l
  2. it worked. ty now just to dump in a loop to cycle through the landmarks & return "home" when done. after that putting it in a nice body. EDIT: extra thoughts, is it better to "inline" a loop creating a list of the LM names or as a seperate function. i'm going to be putting a CHANGED_TELEPORT in which will start a timer untill the next "jump". how long is a good amount of time. 15sec, 30? also i have to figure out how to block ALL other features of the RLV system (i don't want my "ship" getting trapped by an auto-scanning RLV trap)
  3. i had an idea. i could use the RLV force TP system to tp my avi(or an alt, probably an alt) around unassisted. so i butchered the code located at the above link with Example 1 on llRequestInventoryData Butchered code below: key vgKeyOwner; default{ touch_start( integer vIntNull ) { if (llDetectedKey( 0 ) == vgKeyOwner) { integer vIntLMcount = llGetInventoryNumber( INVENTORY_LANDMARK ); //-- make sure we have a landmark in invetory if (vIntLMcount) { llRequestInventoryData( llGetInventoryName( INVENTORY_LANDMARK, 0 ) ); } } } dataserver( key vKeyNull, string vStrData ) { //-- because we don't know who touched us in this event, this //-- only works for the owner when called from the dataserver llOwnerSay(vStrData); list tokens = llParseString2List (vStrData, ["<", ",", ">"], []); string pos_str = ""; vector global_pos; // The coordinates given by the dataserver are the ones of the // South-West corner of this sim // => offset with the specified local coordinates global_pos.x = llList2Float (tokens, 0); global_pos.y = llList2Float (tokens, 1); global_pos.z = llList2Float (tokens, 2); // Build the command pos_str = (string)((integer)global_pos.x) +"/"+(string)((integer)global_pos.y) +"/"+(string)((integer)global_pos.z); llOwnerSay ("Global position : "+(string)pos_str); // Debug purposes // Fire ! llOwnerSay ("@tpto:"+pos_str+"=force"); //llMapDestination( llGetRegionName(), (vector)vStrData, ZERO_VECTOR ); } on_rez( integer vIntNull ) { llResetScript(); } state_entry() { vgKeyOwner = llGetOwner(); }} now it reads from the landmark fine. the llMapDestination() works and shows the correct location. i think i fubb'd something in the re-assembling of the co-ordinates needed for RLV as the force TP won't find the destination
  4. Tommie, there are about 5 or 6 "missing" scripts here as this i just a (very)small part of a much larger (and on hold) project. i only posted the main script as a RFC(Request For Comment) to see if there were any MAJOR "you will blow up the server if you do this" problems. if you message me inworld i can send you a copy of the rental box with all scripts (updated teleport) and notecards. i just ask that you don't sell it. @Rolig, Bingo. addy is the key of the "room" to turn off security. dest is the location. /cookie
  5. i tried a Frank 'n' Stiened version of this: //-- Open map for owner to 1st landmark in object inventory on touch//-- *MUST* be in an attached object (llMapDestination Requirement for non-touch use)key vgKeyOwner; default{ touch_start( integer vIntNull ) { if (llDetectedKey( 0 ) == vgKeyOwner) { integer vIntLMcount = llGetInventoryNumber( INVENTORY_LANDMARK ); //-- make sure we have a landmark in invetory if (vIntLMcount) { llRequestInventoryData( llGetInventoryName( INVENTORY_LANDMARK, 0 ) ); } } } dataserver( key vKeyNull, string vStrData ) { //-- because we don't know who touched us in this event, this //-- only works for the owner when called from the dataserver llMapDestination( llGetRegionName(), (vector)vStrData, ZERO_VECTOR ); } on_rez( integer vIntNull ) { llResetScript(); } state_entry() { vgKeyOwner = llGetOwner(); }} and //calculates your position relative to <0,0,0> of 'Da Boom' in meters when you touch itvector vecrel; //a sum of llgetpos and llgetregioncorner (and another vector). Saving time doing vector math. default{ state_entry() { llSetText("Touch me to get your position", <1,1,1>, 2.0); } touch_start(integer total_number) { vecrel = llGetRegionCorner() + llDetectedPos(0); llWhisper(0, "llGetRegionCorner() is:"+(string)vecrel ); //for debugging before vector addition vecrel -= <256000.0, 256000.0, 0.0>;//Da Boom's region corner is at <256000.0, 256000.0, 0.0> llWhisper (0, "Position relative to <0,0,0> of 'Da Boom': "+ (string)llRound(vecrel.x) +",\t\t\t"+ (string)llRound(vecrel.y) +",\t\t\t"+ (string)llRound(vecrel.z) + "."); llWhisper(0, "Position relative to <0,0,0> of 'Da Boom':"+(string)vecrel ); //faster but unformatted output }} and i think it gave me the right cordinates but had no way of checking because llMapDestination needs a name. i'm thinking of butchering in this: // Pass a global position to this function, and the object// will move there. setGlobalPos(vector globalDest) { vector localDest; do { localDest = globalDest - llGetRegionCorner(); llSetPos(localDest); } while (llVecDist(llGetPos(), localDest) > 0.1);}default { state_entry() { vector DABOOM_CORNER = <256000, 256000, 0>; // DaBoom's region corner. setGlobalPos(DABOOM_CORNER + <128, 128, 128>); // Travel to <128,128,128> in DaBoom. }} make the prim move between locations and record the info, sending it to my DB each time. Side note: Void replied but i can't view the reply.
  6. Hi all, just a quickie (that will probably snowball) is it possible to get either the Parcel Key or the region & parcel cordinates from a Landmark. this i related to my combat game because some Land Owners might object to having combat on their land and i will have to set the HUD to DMZ (non-combat mode) on their land so the players don't get banned. i would like to set an automated system so that i don't have to visit every sim(some that may have scripts disabled) and get them manually. Ty in advance.
  7. that is an option. personally i think that the land owner may have passed on & the tier is just being paid out of an active account. or they have forgotten about it and don't worry about the ~$30/month comming out
  8. we (the group) filled multiple AR's and the greifing objects multiplied further over the course of 3 weeks until the parcel was inaccessable. reporting the greifers doen't really help the problem. the greifers use "spam cubes" (10 x 10 x 10) to cover an area, usually with obsene pictures or annoying sounds, particle poofers. and fill the parcel prim limit rendering anything else (poseball furniture, teleporters) from working. the only way we "fixed" the problem & only temporaraly was to crash the region. NOT AN IDEAL SOLUTION
  9. hi all, i'm part of a group that owns some land. said land is currently suffering continuing greifer attacks. both the owner & only officer (2 different people) have not been online since ~Jan 09. is there anyway to either petition LL for promotion inside the group so that we can make some active officers or for them to contact the owner to find out if they are still "alive". Cross posted in "people > General"
  10. hi all, i'm part of a group that owns some land. said land is currently suffering continuing greifer attacks. both the owner & only officer (2 different people) have not been online since ~Jan 09. is there anyway to either petition LL for promotion inside the group so that we can make some active officers or for them to contact the owner to find out if they are still "alive".
  11. ty, guys if you actually read the script, @ PeterCanessa Oh, whisper is enough because it only rezzes @ <0,0,1.5> above the rezzing object. @ Tharkis Olafson, there are 2 objects, one has the prefix HOLO & the other has the prefix BOXED (not shown due to copy & paste fubar) @Thinkerer Melville, i don't want a commercial solution, i'd rather make it myself. thats what this forum is about. also USD$10 is pretty expensive, ~2500L$ and as there is a whisper command it should be obvious (and didn't think i needed to post it) that there is a second script in the HOLO object. here are both scripts: HOLO VENDOR: string product_name(integer index){ list gLstMnu = []; integer a = 0; integer holodisp = llGetInventoryNumber(INVENTORY_OBJECT)+1; while (a < holodisp) { if (llGetSubString(llGetInventoryName(INVENTORY_OBJECT,a),0,3) == "HOLO") { gLstMnu += llGetInventoryName(INVENTORY_OBJECT,a); } a++; } return llList2String(gLstMnu,index);}integer x = 0;integer gChan;string purchased_object;integer cost;string gNoteCard = "Config";integer gNCline;key gNCquery;key pID;float pCUT;string pNAME;integer gCut;default{ state_entry() { llSay(0,"Vendor Online."); llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); } changed(integer a) { if (a & (CHANGED_OWNER | CHANGED_INVENTORY)) { llResetScript(); } } run_time_permissions( integer perm ) { if (perm & PERMISSION_DEBIT) { state running; } else { llSay(0,"Permission not granted. \nscript now shuting down."); llSetScriptState(llGetScriptName(),0); } }}state running{ state_entry() { llSay(0, llGetObjectName()+" Ready!"); gChan = (integer) ( "0xF" + llGetSubString( llGetKey(),0,6 ) ); llSensorRepeat("","",AGENT,10,PI,30); llSetLinkPrimitiveParams(2,[PRIM_COLOR,ALL_SIDES,<0.0, 0.0, 1.0>,0.25,PRIM_GLOW,ALL_SIDES,0.1]); gNCquery = llGetNotecardLine(gNoteCard, gNCline); } touch_start(integer num_detected) { integer i; for(i = 0; i < num_detected; ++i) { if (llGetLinkName(llDetectedLinkNumber(i)) == "Previous") { llOwnerSay(product_name(x--)); llRezAtRoot(product_name(x),llGetPos()+<0.0,0.0,1.5>,ZERO_VECTOR,ZERO_ROTATION,gChan); if (x == i+1) { llWhisper(gChan,"KILL"); } else if (x == llGetInventoryNumber(INVENTORY_OBJECT)) { x = 0; } } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Next") { llOwnerSay(product_name(x++)); llRezAtRoot(product_name(x),llGetPos()+<0.0,0.0,1.5>,ZERO_VECTOR,ZERO_ROTATION,gChan); if (x == i+1) { llWhisper(gChan,"KILL"); } else if (x == llGetInventoryNumber(INVENTORY_OBJECT)) { x = 0; } } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Pay Button") { llOwnerSay(llGetLinkName(llDetectedLinkNumber(i))); purchased_object = product_name(x); state purchase; } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Holo Tank") { llWhisper(gChan,"KILL"); } } } no_sensor() { llSay(gChan,"KILL"); llListenRemove(gChan); state standby; } dataserver(key lquery, string data) { if (gNCquery == lquery) { if (data != EOF) { list tmp = llParseString2List(data, ["="], []); string setting = llList2String(tmp,0); if (setting == "PARTNER_KEY") { pID = llStringTrim(llList2String(tmp,1),STRING_TRIM); } else if (setting == "PARTNER_CUT") { pCUT = llList2Float(tmp,1); } else if (setting == "PARTNER_NAME") { pNAME = llStringTrim(llList2String(tmp,1),STRING_TRIM); } } gNCquery = llGetNotecardLine(gNoteCard, ++gNCline); } }}state standby{ state_entry() { llSensorRepeat("","",AGENT,10,PI,30); llSay(0,"standby mode"); llSetLinkPrimitiveParams(2,[PRIM_COLOR,ALL_SIDES,llGetColor(1),0,PRIM_GLOW,ALL_SIDES,0]); } /* touch(integer num) { state running; } */ sensor(integer num) { state running; }}state purchase{ state_entry() { llWhisper(0,"Right Click to Purchase"); list tmp = llCSV2List(purchased_object); cost = llList2Integer(tmp,2); llSetPayPrice(PAY_HIDE, [cost,PAY_HIDE,PAY_HIDE,PAY_HIDE]); gCut = llRound(cost * pCUT); llOwnerSay("Cut Payed To " + pNAME + " is L$" + (string)gCut); } money(key id, integer price) { list tmp = llCSV2List(purchased_object); if (price == cost) { llRegionSayTo(id,0,"Thakyou for Purchasing " + llList2String(tmp,1)); llGiveInventory(id,"BOXED,"+ llList2String(tmp,1)); //gives a seperate item llGiveMoney(pID,gCut); } else if (price < cost) { llRegionSayTo(id,0,"Sorry, You Didn't Pay Enough to Purchase.\nThe Price is L$" +(string)cost + " for "+ llList2String(tmp,1)); llGiveMoney(id,price); } else if (price > cost) { llRegionSayTo(id,0,"You Payed too Much to Purchase.\nThe Price is L$" +(string)cost + " for "+ llList2String(tmp,1)); llGiveMoney(id,price); } state running; }} Kill script in the rezzed holo object integer gChan;default{ on_rez(integer a) { gChan = a; llListen(gChan,"", NULL_KEY, ""); //llOwnerSay("Listening on: " + (string)a); llSetPrimitiveParams([PRIM_TEMP_ON_REZ,TRUE]); llTargetOmega(<0.0,0.0,1.0>,0.25,0.01); } listen(integer chan, string name, key id, string msg) { if (msg == "KILL") { llDie(); } }}
  12. hi all, here is one of my current projects not quite done yet but i need help with a couple of parts. CODE: string product_name(integer index) { list gLstMnu = []; integer a = 0; integer holodisp = llGetInventoryNumber(INVENTORY_OBJECT)+1; while (a < holodisp) { if (llGetSubString(llGetInventoryName(INVENTORY_OBJECT,a),0,3) == "HOLO") { gLstMnu += llGetInventoryName(INVENTORY_OBJECT,a); } a++; } return llList2String(gLstMnu,index); } integer x = 0; integer gChan; string purchased_object; integer cost; string gNoteCard = "VendorConfig"; integer gNCline; key gNCquery; key pID; float pCUT; string pNAME; integer gCut; default { state_entry() { llSay(0,"Vendor Online."); llRequestPermissions(llGetOwner(),PERMISSION_DEBIT); } changed(integer a) { if (a & (CHANGED_OWNER | CHANGED_INVENTORY)) { llResetScript(); } } run_time_permissions( integer perm ) { if (perm & PERMISSION_DEBIT) { state running; } else { llSay(0,"Permission not granted. \nscript now shuting down."); llSetScriptState(llGetScriptName(),0); } } } the main part i need help with is here: state running { touch_start(integer num_detected) { integer i; for(i = 0; i < num_detected; ++i) { if (llGetLinkName(llDetectedLinkNumber(i)) == "Previous") { llOwnerSay(product_name(x--)); llRezAtRoot(product_name(x),llGetPos()+<0.0,0.0,1.5>,ZERO_VECTOR,ZERO_ROTATION,gChan); if (x == i+1) { llWhisper(gChan,"KILL"); } else if (x == llGetInventoryNumber(INVENTORY_OBJECT)) { x = 0; } } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Next") { llOwnerSay(product_name(x++)); llRezAtRoot(product_name(x),llGetPos()+<0.0,0.0,1.5>,ZERO_VECTOR,ZERO_ROTATION,gChan); if (x == i+1) { llWhisper(gChan,"KILL"); } else if (x == llGetInventoryNumber(INVENTORY_OBJECT)) { x = 0; } } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Pay Button") { llOwnerSay(llGetLinkName(llDetectedLinkNumber(i))); purchased_object = product_name(x); state purchase; } else if (llGetLinkName(llDetectedLinkNumber(i)) == "Holo Tank") { llWhisper(gChan,"KILL"); } } }1. the idea is if i click next (or previous) it kills the current item and then rezzes the new one. currently it just rezzes over the top of the current item. i know i could just alpha the current item & wait for "garbage collection" but i don't believe that that's an ideal solution. 2. another problem i'm having in the same section is that it's skipping the first item. it says the name of item 1 but rezzes item 2. 3. how can i get it to loop back to the start when i get to the end of the items. TODO: email or http comms to a distribution server. DB comms for an update list USUAL COMMENT: i know it's probably "dirty" but thats how i code. alot of this is from scratch but some is Frankensteined in.
  13. the "garbage" info already has a marker "<!--" i'm currently using the left function from the wiki.
  14. is there a way to search through a string for characters and then delete everything after? EDIT: searching through the wiki and found Function: Left & Function: Right
  15. hey all, this is not really a LSL question but it relates to a SL project i'm working on. i'm using a free hosting company at the moment an even though it's no ads. inserted into the bottom of EVERY page is this code <!-- www.000webhost.com Analytics Code --> <script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script> <noscript><a href="http://www.hosting24.com/"><**Only uploaded images may be used in postings**://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript> <!-- End Of Analytics Code --> and it doesn't show on a webpage but it does show in SL. i'm using the example scripts from the wiki key http_request_id; default { state_entry() { http_request_id = llHTTPRequest("url", [], ""); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == http_request_id) { llSetText(body, <0,0,1>, 1); } } } and a bit of modded wiki code <?PHP // Author Waster Skronski. // General Public License (GPL). // Mind that some headers are not included because they're either useless or unreliable. $USE_APACHE_HEADERS = TRUE; // switch to false if you need cgi methods if ($USE_APACHE_HEADERS) { $headers = apache_request_headers(); $objectgrid = $headers["X-SecondLife-Shard"]; $objectname = $headers["X-SecondLife-Object-Name"]; $objectkey = $headers["X-SecondLife-Object-Key"]; $objectpos = $headers["X-SecondLife-Local-Position"]; $ownerkey = $headers["X-SecondLife-Owner-Key"]; $ownername = $headers["X-SecondLife-Owner-Name"]; $regiondata = $headers["X-SecondLife-Region"]; $regiontmp = explode ("(",$regiondata); // cut cords off $regionpos = explode (")",$regiontmp[1]); // $regionname = substr($regiontmp[0],0,-1); // cut last space from simname } else { $db = $GLOBALS; $headers = $db['HTTP_ENV_VARS']; $objectgrid = $headers["HTTP_X_SECONDLIFE_SHARD"]; $objectname = $headers["HTTP_X_SECONDLIFE_OBJECT_NAME"]; $objectkey = $headers["HTTP_X_SECONDLIFE_OBJECT_KEY"]; $ownerkey = $headers["HTTP_X_SECONDLIFE_OWNER_KEY"]; $objectpos = $headers["HTTP_X_SECONDLIFE_LOCAL_POSITION"]; $ownername = $headers["HTTP_X_SECONDLIFE_OWNER_NAME"]; $regiondata = $headers["HTTP_X_SECONDLIFE_REGION"]; $regiontmp = explode ("(",$regiondata); $regionpos = explode (")",$regiontmp[1]); $regionname = substr($regiontmp[0],0,-1); } print "\n$regiondata\n$ownername\n$ownerkey\n$ownername"; ?> Short of finding a new hosting service is there anyway in either LSL or PHP to not print the analytics code?
  16. you would probably have to make it simmilar to a gun. ie. shoot a bullet at the ball because any attachment is phantom and therefore won't collide with anything.
  17. I'm not making it to be a competitor to ANY of the current combat systems out there. I'm making it so that there can be a gridwide game of assassin or assassin rules (on google) there is "technically" no combat. Damage is not done to either party. Therefore no healing/damage tracking. It is one hit, one kill. I just want to know what would be easier/ faster/ less resource intensive to check whether or not the person i just shot was a player or not. check the key against a DB of players have a list downloaded on region change talk to an in-world server with the above info or llRegionSayTo() my target
  18. Hey all, I'm in the process of building a gridwide combat system based on the rules of Assassin & The Assassin's Creed i have already modified existing weapon scripts to use sensors (will be changed to cast ray) & particles instead of rezzed bullets. now i have to work on the "guts" of the system, which will involve a mySQL DB, a php website and the in-world stuff. enough background info. the question is in my gun the sensor "fires" and then particles shoot at the target, then i need to find out if my target was a fellow player or an innocent (or a wall). my current sensor line is: llSensor("","",(ACTIVE|AGENT),96,PI/64); //weapon still in testing. //currently target shooting trying to narrow the sensor cone down now is it faster to check against a database for the target or download a list of currently online players or check with an in-world server with the above info. TL : DR is it faster to check with a web DB or "download" a list from the web DB or check with an inworld server.
  19. Next thing to think about: What happens when somebody clicks "Ignore" instead of chosing a destination? i think in the TPscript i have a timeout if someone doesn't sit on the object but that is a thing to think about. because IIRC you can't tell if someone clicks ignore.
  20. Kal, ty for the help. i used your script (had to fix a couple of bits :matte-motes-big-grin-wink:) and merged it into mine. the problem i'm having now with both yours (copied from the forum) and mine is the they BOTH don't rez the ~~TPSEAT object and i can't see any reason why they don't. // ##########// Important: The multiple TP rezzers must have a unique name.// Same script but different names.// ##########list alpha_names = ["Alfa","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel","India","Juliett","Kilo","Lima","Mike","November","Oscar","Papa","Quebec","Romeo","Sierra","Tango","Uniform","Victor","Whiskey","X-ray","Yankee","Zulu"]; //gets a unique name will be changed for "live"integer CAST_CHANNEL;list NameList;list DestList;key TP_Key;integer TP_Handle;vector TP_Dest;integer DialogChannel;integer DialogHandle;integer startparam; //this sets the script pin & comm channel for the TP object.default{ state_entry() { CAST_CHANNEL = (integer)("0xF" + llGetSubString((string)llGetOwner(), 0, 6)); // Channel is based on owner UUID // so that you don't need to reset all of them at once. llSetObjectName(llList2String(alpha_names,(integer)llFrand(26))); llListen(CAST_CHANNEL, "", NULL_KEY, ""); llRegionSay(CAST_CHANNEL, "whereareyou"); llSetTimerEvent(30.0); //will eventually be llGetUnixTime / 604800 (7 days) } touch_start(integer badtouch) { integer DialogChannel = llGetUnixTime() / -10; DialogHandle = llListen(DialogChannel, "", llDetectedKey(0), ""); llDialog(llDetectedKey(0), "Please Select A Destination.", NameList, DialogChannel); llOwnerSay(llDumpList2String(NameList, "\n")); // DEBUG llMessageLinked(LINK_THIS,255,"TELE","0,2"); } listen(integer chan, string name, key id, string msg) { if (chan == startparam) { llRegionSayTo(TP_Key, startparam, (string)TP_Dest); llListenRemove(TP_Handle); // Close TP listener } else if (chan == CAST_CHANNEL) { if (llGetOwnerKey(id) != llGetOwner()) { return; } // if (msg == "whereareyou") { // No need to transmit the UUID, nor store it either. // Let's just keep the name for some corner cases. llRegionSay(CAST_CHANNEL, "loc, " + (string)llGetPos() + ", " + llGetObjectName()); } else { list tmp = llCSV2List(msg); // if (llList2String(tmp, 0) == "loc") { msg = llList2String(tmp,-1); // Name actually integer i = llListFindList(NameList, [msg]); if (i != -1) { // Name already known. Let's replace the pos. DestList = llListReplaceList(DestList, [(vector)llList2String(tmp, 1)], i, i); } else { // Name unknown. Store the name and the pos. NameList += msg; DestList += (vector)llList2String(tmp, 1); } llSetColor(<0.0, 1.0, 0.0>, ALL_SIDES); } } } else if (chan == DialogChannel) { llListenRemove(DialogHandle); // Close dialog listener. // Store the pos matching the name TP_Dest = llList2Vector(DestList, llListFindList(NameList, [msg])); llMessageLinked(LINK_THIS,255,"PORT",""); llRezObject("~~TPSEAT",llGetPos()+<0.0,0.0,1.0>,ZERO_VECTOR,ZERO_ROTATION,startparam); //This Part Doesn't } } link_message(integer sender, integer num, string msg, key id) { if (msg == "TELE") //This Part works { llSetColor(<1.0,0.0,1.0>,ALL_SIDES); startparam = llGetUnixTime(); } else if (msg == "PORT") //Neither Does This Part { llRezObject("~~TPSEAT",llGetPos()+<0.0,0.0,1.0>,ZERO_VECTOR,ZERO_ROTATION,startparam); llOwnerSay("sit"); } } object_rez(key id) { TP_Key = id; TP_Handle = llListen(startparam, "", TP_Key, "whereto"); llRemoteLoadScriptPin(id, "TeleScript", startparam, TRUE, startparam); // Using llRemoteLoadScriptPin() can't work if you don't set the pin beforehand. // You can either set a constant pin on the TP seats // or else they must already contain the needed script. } timer() { llRegionSay(CAST_CHANNEL, "whereareyou"); llSetColor(<1.0, 0.0, 0.0>, ALL_SIDES); llSetText((string)llGetListLength(NameList), <0.0, 1.0, 0.0>, 1); // DEBUG }} comments added where needed
  21. /facepalm BUT the prims will send the data to each other BUT each prim only recieves the data from one other prim. now i'm getting 3x the data but still only the data from one other prim. before it was outputting 4 names in the touch event now it puts out 12 EDIT: narrowed down the problem: it's in the touch event touch_start(integer badtouch) { integer i =0; while(llGetListLength(clients) > i) { destnames += llList2String(clients,3); i++; } //llDialog(llDetectedKey(0),"Please Select A Destination.",destnames,llGetUnixTime()*-10); llOwnerSay(llDumpList2String(destnames,"\n")); } in the loop building the destnames list but i don't know where/what it is.
  22. hi all, i'm trying to make a self updating teleporter. (ie. doesn't use notecards or databases etc) for testing purposes the are positioned no more that 10m apart and all have exactly the same script(shift copythe prim) and all four objects are reset together. the prims will send the data to each other BUT each prim only recieves the data from one other prim. integer locnum; string addydata; integer startparam; string dest; key addy; list clients = []; integer bcastchan; list destnames = []; default { state_entry() { clients = []; llSetTimerEvent(30); bcastchan = llGetUnixTime() / 86400; llListen(bcastchan,"","",""); llSay(bcastchan,"whereareyou"); } touch_start(integer badtouch) { integer i =0; while(llGetListLength(clients) > i) { destnames += llList2String(clients,3); i++; } llDialog(llDetectedKey(0),"Please Select A Destination.",destnames,llGetUnixTime()*-10); llOwnerSay(llDumpList2String(destnames,"\n")); } link_message(integer sender, integer num, string msg, key id) { if (msg == "TELE") { llSetColor(<1.0,0.0,0.0>,ALL_SIDES); startparam = llGetUnixTime(); llListen(startparam,"~~TPSEAT","",""); } else if (msg == "PORT") { llRezObject("~~TPSEAT",llGetPos()+<0.0,0.0,1.0>,ZERO_VECTOR,ZERO_ROTATION,startparam); } } //llMessageLinked(LINK_THIS,255,"PORT",""); object_rez(key id) { llListen(startparam,"~~TPSEAT", id, ""); llRemoteLoadScriptPin(id, "TeleScript", startparam, TRUE, startparam); } listen(integer chan, string name, key id, string msg) { list tmp = llCSV2List(msg); if (llList2String(tmp,0) == "whereto") { list addytmp = llCSV2List(addydata); dest = llList2String(addytmp,0); addy = llList2Key(addytmp,1); llRegionSayTo(addy,bcastchan,"change"); llWhisper(startparam,"goto,"+dest); } else if (msg == "whereareyou") { llSay(bcastchan,"loc,"+(string)llGetPos()+","+(string)llGetKey()+","+llGetObjectName()); } else if(llList2String(tmp,0) == "loc") { clients = llCSV2List(msg); //llOwnerSay("ding"); llSetColor(<0.0,1.0,0.0>,ALL_SIDES); } else if (~chan = llListFindList( clients, [msg] )) { /*string llMessageLinked(LINK_THIS,255,"TELE","0,2");*/ llOwnerSay("found"); } } timer() { llSay(bcastchan,"whereareyou"); llSetColor(<1.0,0.0,0.0>,ALL_SIDES); llSetText((string)llGetListLength(destnames),<0.0,1.0,0.0>,1); clients = []; destnames = []; } } the object_rez & link_message areas can be ignored at the moment as they are part of the teleport and not related to the communications for the update. any help is appreciated. (i know my code may be "dirty" but this is just an early version)
  23. bugger i just fininshed working the bugs out of my llSensor guns.
×
×
  • Create New...