Jump to content

Wandering Soulstar

  • Content Count

  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. @ellestones Ok ... got it. Back to the drawing board then. Thanks!
  2. It's me again 🙂 After Qie kindly clued me in on the basics of sit animation, Topic: Automatic Sit Animation, I started moving forward in the code and have come up with some additional questions as I am not clear on how parts work, even after trying to read the AVSitter code that Cindy pointed me to. Let me set the scenario and then phrase my questions: I have a linkset (an Elevator). As part of this set I have four prims that are where people can sit. This is controlled by one single script, that identifies the links and sets the sit targets on start My questions come as I am not certain how the animation is being started/stopped for a particular AV on a particular target. The following is my code atm for the relevant events: changed(integer change) { //see if we have someone sitting ... if (change & CHANGED_LINK) { //NUM_LINKS stored at start before anyone could be seated integer newSeated = llGetNumberOfPrims() - NUM_LINKS; //if no one seated turn off the open chat listen if (newSeated == 0 ) { llListenRemove(gOpenChatHandle); } // if first seated start listen and advise else if (newSeated > 0 && gNumSeated == 0) { gOpenChatHandle = llListen(CHAT_CH, EMPTY_STR, NULL_KEY, EMPTY_STR); llWhisper(CHAT_CH, "When everyone is seated and you are ready, just say go in chat"); } gNumSeated = newSeated; //now need to either set the pose for a newly seated AV, of stop for someone that has stood //first get the keys of all currently seated integer x; list newSeatedAVs = []; for (x = NUM_LINKS + 1; x <= NUM_LINKS + gNumSeated; x++) { //add the key to the list newSeatedAVs = newSeatedAVs + [llGetLinkKey(x)]; } //first check to see if any AVs have stood up .. to stop their Animation integer curSeated = llGetListLength(gSeatedAVs); for (x = curSeated - 1; x > -1; x--) { if (llListFindList(newSeatedAVs, llList2List(gSeatedAVs, x, x)) == NOT_FOUND) { //here I need to stop their Animation //not clear how to target a particular AV //remove the AV from the list gSeatedAvs = llDeleteSubList(gSeatedAVs, x, x); } } //check to see if any of the currently seated AVs are truly new and need to set their anim for (x = 0; x < gNumSeated; x++) { if (llListFindList(gSeatedAVs, llList2List(newSeatedAVs, x, x)) == NOT_FOUND) { //request permission to get the animation set llRequestPermissions(llList2Key(newSeatedAVs, x), PERMISSION_TRIGGER_ANIMATION); } } }//end changed link } run_time_permissions(integer permissions) { if (perm & PERMISSION_TRIGGER_ANIMATION) { //get their key key user = llGetPermissionsKey(); //add to the list gSeatedAVs = gSeatedAVs + [user]; //Am assuming that this acts on the AV that I requested permisions for? ///stop the default sit llStopAnimation(DEF_SIT); //and start mine llStartAnimation(ELEV_STAND); } } My questions thus come at two points: In the changed event when I have detected that an AV has stood up, how do I stop the animation for that particular AV in the run_time_permissions I am assuming that I am setting the animation for the AV that I asked permission for .. correct? If not, again how to target. As Always .. Thanks! Wanda
  3. Ahhh ... so the following: changed(integer change) { //see if we have someone sitting ... if (change & CHANGED_LINK) { //code check to see if seated AV and get their link //... //get their key key user = llGetLinkKey(userLink); //call permissions .. will not trigger an ask to the iser llRequestPermissions(user, PERMISSION_TRIGGER_ANIMATION); //continue in run_time_permissions event } } run_time_permissions(integer permissions) { if (perm & PERMISSION_TRIGGER_ANIMATION) { //code to set sit animation } } Thanks for the clarification @Qie Niangao
  4. Appreciate the pointer .. but this is well over the top for what I need, and in any case, looking through the code, as far as I can see they are still requesting permission of the AV.
  5. Hi All, I'd like to set the animation (pose) of an AV when they sit on a prim, without the requesting of permissions. This must be possible as most any chair I have does not ask for this, yet I cannot seem to see in the Wiki how this is accomplished. Any help? Thanks in advance, Wanda
  6. @Innula Zenovka You are correct in that it is really immaterial to the movement of the elevator if the AV TPs out while in movement. I want to track the in/out of the elevator for actions that occur whilst the elevator is at rest. And while in movement I'd have no idea if the AV had left or not. To use the detector prim I'd need to move it along with the elevator as it cannot be linked, llVolumeDetect turns it and anything attached phantom.
  7. @Innula Zenovka Thanks for that. The one thing I like about the full space implementation that I put above is that it covers someone TPing in or out ... of course on the exit it only tells you after they have left, whilst yours tells as the are leaving ..
  8. Ok .. thanks .. and it actually will do very little. Just advise if there is anybody in the elevator or not .. actual movement of the elevator works another way default { state_entry() { llVolumeDetect(TRUE); //will correspond to position (up/down) ME = llGetObjectDesc(); llListen(MAIN_CH, EMPTY_STR, NULL_KEY, EMPTY_STR); //Ask main for where we are .. if main does not reespond, not on yet llWhisper(MAIN_CH, F_REQ_POSITION); } listen(integer channel, string name, key id, string message) { if (channel == MAIN_CH) { //main advising where the elevator is list data = llParseString2List(message, [FUNC_SEP], [EMPTY_STR]); if (llList2String(data, 0) == F_POSITION) { gCurPosit = llList2String(data, 1); } } } collision_start(integer total_number) { //someone has come into the elevator/detector //advise if the elevator is actually in my position if (gCurPosit == ME) { llWhisper(MAIN_CH, F_ENTER + FUNC_SEP + (string)total_number); } } collision_end(integer total_number) { //someone has left the elevator/detector //advise if the elevator is actually in my position if (gCurPosit == ME) { llWhisper(MAIN_CH, F_EXIT + FUNC_SEP + (string)total_number); } } }
  9. @Wulfie Reanimator Thanks, as I suspected. Your comment on the second method though has me confused. Even if one AV had entered the detector prim, and was still there, would a second AV entering not also trigger the collision_start event (or _end as the case may be)?
  10. hmmm .. just thought of a solution .. I think ... please correct me if I am mistaken: Make the detector prim the same size as the elevator. Then collision_start is triggered when they enter, and collision_end when they leave. This as well, from what I have read, would trigger if they TP'd in or out .. no? If so then the only question is .. would the events trigger if the logged out/in from inside the elevator (detector prim)?
  11. Hi All, On my latest project I want to detect when an Av passes through a doorway, and know from which side of the doorway they have 'entered'. Basically want to know if they have entered or left the space (an Elevator). While I realise that if they manage to TP in, or they TP out there is more to do, but for now just working on simple movement. So to do this I'll have a transparent, thin prim, with llVolumeDetect set. From reading through the wiki my conclusion is I'll need to use the collision_start event, and then using llDetectedPos check the result against the detector prim's position to calculate which side they hit, correct? Or is there a way to see which face they collided with that I am missing? Thanks! Wanda
  12. Thanks All ... in the end there was too much additional code for this to work right independent of one large or multiple calls ... will in the end leave it as each blind moving one after the other.
  13. ha ha .. actually had not even noticed that it said resting .. my brain turned it to resetting 🙂
  14. @Wulfie Reanimator They do no have to change at the same instant, this is for window blinds, which can either be controlled individually or have the whole room change via one initial call. Was looking at it simply from a point of view of code efficiency.
  15. Hi All, Have a question to see if anyone knows or has looked into the following to see what is more efficient. Scenario is that I am going to be setting the LinkParams of a number of prims (5-10). Would it be better to make all the calls with one single llSetLinkPrimitiveParamsFast using multiple PRIM_TARGET to do in a single call, or do a loop calling llSetLinkPrimitiveParamsFast once for each prim?
  16. Bit difficult to follow the flow here but .. when you ask to '... to reload a new notecard without resting the script ' I do not see what one has to do with the other. In the call llGetNotecardLine, you pass the name of the notecard and the line you want from that notecard. There is nothing to keep you from changing that each time you call, with no reset needed. To be honest I cannot even see how you ever get into the dataserver event to begin with ... the only llGetNotecardLine calls I see are in said event ...
  17. @Moni Telling From your two recent posts it seems you have an idea for a role-play system that you want, but do not know how to actually create it. Not trying to be mean or pedantic, just trying to point you in the right direction. If you have specific questions about code you are writing this is the correct sub-forum. If on the other hand,and this appears to be the case, you are looking for someone to code this, show you how to do it, you should post in the Wanted sub-forum.
  18. @Wulfie Reanimator Good points all Wulfie. Particularly in regards to the comments and testing. Comments have been my weak point when I code for the last 30 years ? .. and should have checked that it compiled. In regards to the use of EMPTY_STR, again, correct in that I should have left that out. Just so used to using it now that I forget. Started back in the pre-mono days when it helped save memory, and kept it up as it ensures I don't pass a space by accident. Thanks for the feedback!
  19. @Wulfie Reanimator My first point to the suggestion was to not use a space (" ") to separate the values. This is a personal preference as, depending on what we are passing it could cause problems. Next it was not clear if the ids that were being passed in the first example give were needed, I assumed they were and so looked for a way to preserve and access them, thus the two lists and the loop. the first list would hold the pairs of ids & texture UUIDs (ID^UUID) while the loop would allow you access each pair and do something with it. This way also we are not coding in a limit to there being only two pairs passed. As it seems the ID is irrelevant, and all that will be passed would be the UUID, then only one list is needed obviously, though I would still separate the UUIDs by something other than a space, would not create the constants with a space on the end, and still would code my receiver to loop through the resulting list so that I am not hard-coded to only respond to two.
  20. Thanks Nova! Will see if I can confirm the need for the sleep or not ..
  21. Wulfie beat me to it ? The only thing I'd add is that I try to use seprators for data sets like this to make the field clear. a simple space may mess you up. I'll tend to use symbols that are not to normally be found ... ^, ~, | .. so this would mean: //Call lWhisper(MyChannel, "tex_1"+ DATA_SEP + (string)tex_1 + FUNC_SEP + "tex_2"+ DATA_SEP + (string)tex_1); //Receiving Moduls string EMPTY_STR = ""; string FUNC_SEP = "|"; string DATA_SEP = "^"; listen(integer channel, string name, key id, string message) { list pairs = llParseString2List(message, [FUNC_SEP], [EMPTY_STR]); integer x; integer numPairs = llGetListLength(pairs); for (x = 0; x < numPairs: x++) { list params = llParseString2List(llList2String(pairs, x), [DATA_SEP], {EMPTY_STR])); string id = llList2String(params, 0); key texture = (key)llList2String(params, 1); //do something } }
  22. @ChinRey Ahh .. see now what you were referring to .. Thanks for the detailed explanation!
  23. Hmmm .. well when I have the time to learn will have to make a try for the jump to Blender to improve my meshed prim builds. I do not get what you are saying here @ChinRey. First off, with prims set at Convex Hull, 2 prims are only one LI, so 1/2 that of two unlinked prims, so your statement on a linkset having a high LI confuses me. And while I understand the data transfer part, from a LI perspective (i.e. how much I can have on my parcel) Mesh beats prims by miles ... if I was not to have meshed the various portions of my build it would have been near 1000 LI, not leaving me much space to furnish ?
  24. The part about simply recording the sequence that linked prims are touched can be simple and cheap, but the overall solution that you are asking for is not. Getting a 'free or cheap' highly custom script is basically asking a scripter to spend hours coding to your specification for no recompense. What you are asking for is doable, with the exception of the storing to a notecard, scripts cannot write to notecards so there would have to me a manual step to copy output to a card. But this will take a number of hours of work, and remember that L$250 = 1 USD, so take that into accunt when considering what you are willing to/expect to pay for this custom script job.
  25. @ChinRey I use Mesh Studio, and while I know I am only scrtaching the surface, the basics are quite simple, there are some real good tutorials, in general I swear by it. @Macrocosm Draegonne To the contrary, converting to mesh can save tonnes on LI. As mentioned, I use Mesh Studio and am sure I could get even better results were I to study it a bit more, it saves me 100's of LI on builds. Some recent examples: Detailed Front Door - 70 prims, 35 LI as joined ConvexHull, 3 LI when Meshed Elevator - 138 prims, 69 LI as joined ConvexHull, 6 LI when Meshed Overall on current build, various pieces, 1342 prims, 674 LI as joined ConvexHull, 85 Li when meshed
  • Create New...