Jump to content

Wandering Soulstar

Resident
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. Hi All .. could anyone point me to where the list of characters that are valid in Script Names might be found?
  2. Hi Sorciaa .. would be happy to talk to you abut a custom build for you. Drop me a message inworld and we can talk.
  3. @Sarahbuxso Where is this? Which continent?
  4. @Simnelia Petrichor Depending on what you want to do, you might try using chat to the user as described HERE ... this gets you completely around the limitations for text length ...
  5. You'll need to set up a listen for the channel you want the respond to .. the channel number is the number after the slash .. and then everything after the number will be the message you receive.
  6. @testgenord1 Just realised that there were a few things wrong with my last post and have edited. Principally the comment about changing the HitPoints list (and buttons) to numeric. As the code was written, this would have caused a clash/false assignment with the Sense range, and I assume is why one was numeric and the other text in the original scenario. One thing that you can do to avoid these clashes is to track which menu you are in. In the below, I have re-written the touch_start and the listen events to show this, and am now assuming that HitPoints is numeric: list CurrentList = []; string CurrentMenu = ""; default { //other events touch_start(integer ok) { CurrentList = Zombie; CurrentMenu = "type"; llDialog(llDetectedKey(0), "Zombie Type ?", Zombie, channel); } listen(integer channel, string name, key id, string message) { if (~llListFindList(CurrentList, [message])) { string prompt = ""; if (CurrentMenu == "type") { NotecardName = message; prompt = "Sensing Range ?"; CurrentList = SenseRange; CurrentMenu = "range"; } else if (CurrentMenu == "range") { Range = (float)message; prompt = "Zombie Max Hits till Death ?"; CurrentList = HitPoints; CurrentMenu = "hit pts"; } else if (CurrentMenu == "hit pts") { DeathPoints = (integer)message; CurrentList = []; } if (prompt != "") { llDialog(id, prompt, CurrentList, channel); } else { state Sense; } } } }
  7. @testgenord1 I'd make one further suggestion in regards to cleaning .. the listen event in the default state can be reduced massively: listen(integer channel, string name, key id, string message) { integer idx; //first check if a zombie response if (~llListFindList(Zombie)) { NotecardName = message; llDialog(id, "Sensing Range ?", SenseRange, channel); } //or if sense range else if (~llListFindList(SenseRange)) { Range = (float)message; llDialog(id, "Zombie Max Hits till Death ?", HitPoints, channel); } //and last hit points else if (~(idx = llListFindList(HitPoints))) { //Assumes the definition of a list parallel to HitPoints: //list HitPointValues = [1,2,5,10,20,50] DeathPoints = llList2Integer(HitPointValues, idx); state Sense; } } As for an offline editor .. I'd recommend LSLEditor .. have used it for years and is quite good.
  8. How so? How does calling llSetLinkParamsFast from one or even 5 prims at any moment, when the prims are clicked do that? This is the third version of this. Have been using the previous version for nearly 4 years and have not noticed any lag in the sims I’ve built in. This is just an updated version with a better HUD, and updated capabilities.
  9. The worker scripts do things like moving, distributing, sizing prims, as well as setting/matching textures. The only way that works is if they are in the prims that are being created to make the build. And when doing the initial build of any house or building, the numbers can easily get into the hundreds. The reload could take quite a long time due to the inbuilt delay. There could be multiple worker scripts in each prim (only one running at any one time), so say 200 prims, 3 worker scripts, 2 sec delay per (if I remember properly) = 20mins to reload.
  10. Again .. sorry for being confusing. The full system is: HUD worn by the user Individual script(s) in the prims that are being used to build whatever it is we are building The HUD controls which build function (script) is active in the prims, and for the more complex tools may deliver specific information on request to the prims, or facilitate the communication between them. Isn't the fact that the timer is running enough to be a bit of load .. the system needs to be doing something. I know it may not be much individually, but in the hundreds?
  11. @Qie Niangao, @steph Arnott Thanks for the discussion ... The idea of a 'monitor' prim using llGetAgentSize is a good answer answer to the lack of events, but for it to work 100% would need to make the existence of the monitor something that the HUD does, otherwise at the whim of the user actually rezzing the monitor, and leaving it out. And to do it automatically would need to check on a regular basis if one was in region .. and if not whether the User is currently on land that the monitor can be rezzed to
  12. sorry .. by agent was referring to the scripts that reside in the prims .. outside of the HUD have considered that as well ... and could add the code into the HUD to ensure that said 'monitor' always existed in the Region .. was just hoping there was an easier, event driven, way to do it.
  13. Thinking about it .. you are right .. the HUD itself does not need to clean up .. that is taken care of in the on_rez when logging back in ... This looks interesting .. removes the back and forth communication overhead ... but still have the issue of the hundreds of timers constantly running ... would that not be a major drag on system resources?
  14. Agree .. is a good path, but as I said, my concern is the number of agent scripts, running timers and sending the messages, that would need to be responded to by the HUD. This is for a builder 'toolbox' that I am creating and so every prim in the build (while it is in work) contain the agent script and so potentially hundreds of timers continually running, and, even if every 5-10 minutes, a tonne of messages flying back and forth.
  15. If you want to provide a selectable list of options, you could try the functionality I described HERE ... not sure how this would port to OS though.
  16. I did think about that .. the problem though is twofold: The scripts in the HUD would not know that the user has logged out as they 'disappear' so could not do their internal clean up The worker scripts that would also need to do cleanup could be very numerous and having 100+ timers running constantly would not be a good use of system resources
  17. Since you have the questions in a list, you could also use just one line of code to get your random question: string question = llList2String(llListRandomize(questions, 1), 1);
  18. Hi All, 99% sure I know the answer already, but thought I'd check. From code in a HUD we can identify when an AV (and thus the HUD and script) changes regions, when they log-in, and when they attach/remove the HUD .. but from the code in the HUD: We cannot tell when the user logs out We only know about the region change when we arrive in the new region, nothing about us leaving the previous region From everything I have read in the wiki the above two limitations hold true. My question is, am I missing something somewhere that would allow my code (in the HUD) to identify these two events?
  19. .. to add to the above, whilst your system is for delivery of notecards from the server to the terminals, the initial communication is from the terminals to the Server. They 'register' with the server (via email) as the server will need their 'keys' to be able to send them the notecards.
  20. @steph Arnott .. left out the collecting of the rots .. just assume they are already in myRot and mirrorRot 🙂 So, if I understand the example .. this would result rot having a 180 degree change in it's z axis? i.e. depending on which axis it is I put PI in the desired axis position in the vector?
  21. Hi All, Rotations and the math behind them are my bane in LSL .. just cannot get my head around them. What I am trying to do is mirror the rotation of a prim.. i.e. If Prim A is rotated at 45 degrees on the x axis, I want to set Prim B's x axis rotation to 225 degrees. Is it as simple as: myRot.x = mirrorRot.x + (180 * DEG_TO_RAD); .. or is there more to it?
  22. Thanks!!!!! @animats I see yours will give me the max/min position for each xyz, which is very good. For what I need though I only every need to find one and so the base formula as pointed out by @Wulfie Reanimator. Following is the sample code off the back of these guides. I knew it had to be simpler than what I was doing 🙂 list CORNERS = [<1.0, 1.0, 1.0>, <-1.0, 1.0, 1.0>, <-1.0, -1.0, 1.0>, <-1.0, 1.0, -1.0>, <-1.0, -1.0, -1.0>, <1.0, -1.0, -1.0>, <1.0, 1.0, -1.0>, <1.0, -1.0, 1.0>]; float get_mod(string axis, integer min) { rotation rot = llGetRot(); list vals = []; integer x; for (x = 0; x < 8; x++) { vector corner = llList2Vector(CORNERS, x) * rot; //now grab just the axis we are looking for if (axis == "x"){vals += [corner.x];} else if (axis == "y"){vals += [corner.y];} else if (axis == "z"){vals += [corner.z];} } //now sort according to which value we are looking for vals = llListSort(vals, 1, min); //and return the first return llList2Float(vals, 0); } default { touch_start(integer total_number) { float mod = get_mod("x", FALSE); float dist = ((llGetScale().x)/2) * mod; float posit = llGetPos().x + dist; } }
×
×
  • Create New...