Jump to content

Wandering Soulstar

Resident
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. Innula .. am setting in the root link of a linked prim set. As I said, the setting gets there partially, i.e. the cutoff value (200) is there .. it is just the Alpha mode is not being changed to masking.
  2. Hi All, Have some behavior that I am not clear why it is happening, and was hoping someone could point me in the right direction. following is the snippet of code that executes: //Set Texture llSetTexture(text, ALL_SIDES); //if open texture .. then set alpha mask if (text == OPEN_TEXT) { llSetLinkPrimitiveParamsFast(LINK_ROOT, [PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK, 200]); } What is happening is that when this is run in a new prim, ALPHA_MODE_MASK is not getting set. If I go into the prim's properties in the editor, the Alpha mode is still set to none, but as soon as I set it there to masking, the cutoff is at the 200 that I passed in the function call ... so what gives? How can part of the parameters be set, but not the others?
  3. Thanks to both! Rolig for clarifying the way it would act .. and Jasdac for the PRIM_LINK_TARGET suggestion. That may make the coding simpler as I move the panels. That way in a single call I can reposition, for example, two of the child prims!
  4. Hi All, Am working on a script for a specific set of patio doors that I have on my new house, and have some questions about how this would actually work in-world. I am not able to go inworld for some time but do have time to code, and so was hoping to get some things clear before I spent a whole lot of time pecking away at the key board. What I have is a four panel door, that can open a varying number of the panels, and when fully open the panels slide into the wall. When they move, the distance is small steps to show the slide. All four panels are linked, the root prim is the panel that is next to the wall, and the one that has the control script. Now to move the initial three panels, clear on how it would work, using llSetLinkPrimitiveParamsFast passing the link and setting the position relative to the root. My question comes when the first three panels are at the root's position and I want to move all four 'into' the wall. Is there a way that I can just send a command to the root prim to do it's stepped move, and being the root, drag along the other child prims (without using llSetPos an incuring the 0.2 sec delay) or do I need to send a move to the root and then to the child prims to move again to align at the root? if the later is the case, would the following single call work to move all of the children: llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_POS_LOCAL, <0.0, 0.0, 0.0>])? Thanks in advance! Wanda
  5. You'll need to remove them after the initial loop is done, otherwise you are reducing the count of inventory in the middle of your for loop. easiest way to do that would be: integer num = llGetInventoryNumber(INVENTORY_NOTECARD); integer x; string cardName; list cards = []; key user = llDetectedKey(0);  for (x = 0; x < num; x++) { //get the name and check that it is not whitelist cardName = llGetInventoryName(INVENTORY_NOTECARD, x); if (cardName != "Whitelist") { llGiveInventory(user, cardName); cards = cards + [cardName]; } } //now remove them num = llGetListLength(cards); for (x = 0; x < num; x++) { llRemoveInventory(llList2String(cards, x)); }
  6. Hi ... following is a suggestion in two parts. One thing to remember is that llDetected functions only work in certain events: To your first, the code inside the if that has determined something should be given: integer num = llGetInventoryNumber(INVENTORY_NOTECARD); integer x; string cardName; key user = llDetectedKey(0); for (x = 0; x < num; x++) { //get the name and check that it is not whitelist cardName = llGetInventoryName(INVENTORY_NOTECARD, x); if (cardName != "Whitelist") { llGiveInventory(user, cardName); } } For the second, not quite sure what your criteria are .. but the following will tell you how many notecards are there excluding Whitelist: //how many total notecard integer num = llGetInventoryNumber(INVENTORY_NOTECARD); //check if the whitelist is there if (llGetInventoryType("Whitelist") == INVENTORY_NOTECARD) { //reduce the count num = num - 1; }
  7. The easiest way (for me at least) is to have paired global lists, one with responses, and the other with notecard names. when the response comes in you find the index in the RESPONSES list, and then pull the value from the NOTECARDS list to use in the llGiveInventory call.
  8. Qie beat me to the punch ? ... I was typing up the code that does exactly what Qie says above: default { state_entry() { llListen(4462, "", NULL_KEY, ""); } listen(integer channel, string name, key id, string message) { if (message == "clue1request") { llOwnerSay("Clue Sent"); llGiveInventory(llGetOwnerKey(id), llGetInventoryName(INVENTORY_NOTECARD, 0)); } } }
  9. Kai, You do not need a listen, and not sure what the llMessageLinked you have in state_entry is for. You do not need to set up anything to get linked messages. the problem I see is that in the dialog you are sending !shoot! .. while in the shooting script you are checking for !shoot ... i.e. you are sending an extra ! at the end.
  10. Kai, From what I am reading above, the other script that you want to activate is in the same prim as the one with the dialogs, yes? In that case what you should do is send a linked message. Snippet in Dialog script: else if (message = "R000") { //this can be removed if you actually do not need this in open chat llSay(0,"!shoot"); //call to other Script llMessageLinked(LINK_THIS, 0, "!shoot!", NULL_KEY); } Snippet in Other script: link_message(integer sender_number, integer number, string message, key id) { if (message == "!shoot!") { //activate } }
  11. Kai, Your if structure was incorrect, and yes .. you need to call dialog each time you want a menu .. the below should work: list buttons = ["Weapons", "Music", "Return"]; string dialogInfo = "\nHow can I help you?."; key ToucherID; integer dialogChannel; integer listenHandle; default { state_entry() { dialogChannel = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) ); } touch_start(integer num_detected) { ToucherID = llDetectedKey(0); listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSetTimerEvent(60.0); // Here we set a time limit for responses } listen(integer channel, string name, key id, string message) { //stop the timer llSetTimerEvent(0.0); //remove listen llListenRemove(listenHandle); //first level menu responses if (message == "Programs") { string dialogInfo = "\nWhich function should I perform?"; list buttons = ["R000", "R030", "R050"]; //call second level menu listenHandle = llListen(dialogChannel, "", ToucherID, ""); llDialog(ToucherID, dialogInfo, buttons, dialogChannel); llSetTimerEvent(60.0); // Here we re set a time limit for responses } else if (message == "Music") { llSay(0,"This function is not Operable yet."); } else if (message == "Return") { llSay(0,"Until next time."); } else if (message = "R000") { llSay(0,"!shoot"); } else if (message == "R030") { llSay(0,"This function is not operable yet."); } else if (message == "R050") { llSay(0,"This function is not operable yet."); } } timer() { // stop timer llSetTimerEvent(0); llListenRemove(listenHandle); llWhisper(0, "Sorry. You snooze; you lose."); } }
  12. So even if wearing slink of mesh shoes ... have different shoe base objects that go with the shoe and are part of the outfit ...
  13. Hi All ...Random question to start the day, brought on by me changing from my platforms to my work boots. Is there any was to set hover-height of an AV? Have a great Day! Wanda
  14. EnCore ...Sounds like you are making something similar to a tool I made for myself to aid my building. Happy to discuss inworld if you'd like ?
  15. Are you trying to position the child in the same place independent of the rotation of the root, or in the same position relative to the root?
  16. And to make matters worse, there is no way I can code against this happening. The fix provided by Wulfie, re-compiling, cannot be done from within. To be able to reset another script, using llResetOtherScript, the other script needs to be running. In ant case I'd imagine that the same problem would occur, i.e. while the inventory tells me the script is there, the system does not recognise it as a script.
  17. The strange thing is that this was such a massive failure. 1500 scripts all wonkered, but another 1500 working fine. The constant was that the scripts whose state was False (not running) were the ones that broke, and the those whose state had been running were fine.
  18. Thanks Wulfie ... works like a charm. Long wait, but much easier, and missing a few here or there is not as critical as the ouliers will be found when I go to use them. Still be nice to know why this suddenly happened.
  19. Hi All, Another strange one that perhaps someone has come across or can explain. Let me set the scenario and then what is happening: I have a set of scripts I use when building, there are a total of three, plus a control script, in each prim while I build. These are controlled via a HUD that I built, at its simplest just telling the prims which script should be active. I have been using this to build for a number of years now, and while not bullet proof for sales on the market place, it does the job and has been very stable. Came in-world just a bit ago and was back to a large house build I am working on for the first time in a couple week. Went to the last section I was working on and set to work. When I set to have a particular worker script enabled, I got flooded with error messages that the script was missing, yet on inspection could see that the script was there, what is more my code checks to see if the file is there before trying to enable it through an Inventory check. I confirmed this by resetting the control script in one prim, this automatically on start call to set every script in inventory to not running with the following code: set_scripts(integer active) { //Stop any running scripts integer num = llGetInventoryNumber(INVENTORY_SCRIPT); string name; integer x; string myName = llGetScriptName(); for (x = 0; x < num; x++) { //If it is not me turn it off name = llGetInventoryName(INVENTORY_SCRIPT, x); if (name != myName) { llSetScriptState(name, active); } } } .. and .. yes you guessed it .. debug/errors for each script name (that was read from Inventory) saying that it was not found. I have found some work arounds to fix, but considering the size of my build these are not really helpful, unless there is no other way: Edit the script, set to running, non-mod the code so that the save button is enabled, save, and will work fine from then on Take into inventory and re-rez, again works fine from then on The first is untenable with some 750 prims atm and two scripts per, I'd be at it for the next two weeks. The second difficult as well. The build is not linked, and still in work. Would easily miss prims here or there and would have a mess to get it back in place. So my hope is that this sounds familiar to someone and they have a magical answer for me ... Please? Thanks in advance! Wanda
  20. Thanks to all for the responses! Definitely will never be getting anywhere near the 1000 message range ?
  21. Hi All, I have a question in regards to the queuing of event. Now the Wiki states: So seem very straight forward, my question though is does this mean upto 64 calls to the same event? What I mean is: Have a script that is going to send out a call to other prims on a chat channel: 'Hey .. who is there?' in effect. Each prim that has a listener script will respond, using llRegionSayTo with some specific data. There definitely will not be anywhere near 64 answering, more in the range 20-30. The order I receive the responses is immaterial, I just want to be certain I receive them all. My planned code in general was: list gCallers = []; list gMessages = []; integer sHandler; default { state_entry() { gCallers = []; gMessages = []; sHandler = llListen(CALL_CH, EMPTY_STR, NULL_KEY, EMPTY_STR); llSay(CALL_CH, "Please Check In"); llSetTimerEvent(5.0); } listen(integer channel, string name, key id, string message) { if (channel == CALL_CH) { //store and reset timer ... gCallers = gCallers + [id]; gMessages = gMessages + [message]; llSetTimerEvent(5.0); } } timer() { llSetTimerEvent(0.0); state do_work; } } Anything I'm missing here? .. seems like it should work ... have not tried yet .. not able to get in-world ? Thanks in Advance! Wanda
  22. Hi Pixstudio, Formatted your code to read a bit better, is this what you meant? link_message(integer sender_num, integer num, string msg, key id) { if (llGetSubString(msg, 0, 1) == "A") { string A1 =(llGetSubString(msg,1,-1)); llSay(0,"A"+msg); } } If that is the case not quite clear what you are trying here. the if will never read TRUE, llGetSubString(msg, 0, 1) will read in the first two characters of msg. If you only want the first it should be llGetSubString(msg, 0, 0) your llSay is just going to say the full message with an 'A' added to the front.
  23. Nova .. the rounding part I understand, and is the result of going to three scripts and then back to two. That problem was supposed to be resolved by only having two scripts, from the start. But I now see what it is .. actually with two scripts it is going to normally be Li 2. What I mentioned above about things happening when you executed events, or changed script properties was really in the end just the system finally realising that it had two scripts .. pushing the server to 1.5 .. and thus to 2 Li. So in short, a joined pair of convex-hull prims, with two scripts in one of them .. will be 2 Li ... and that is just the way things are <sigh>.
  24. Any property .. immaterial which Actually it is not as simple as that under closer inspection. Starting from scratch as above, two prims with ConvexHull set, linked. General Li 1, and at detail Server at 1.0 Add two default Scripts, General Li 1 and Server 1.3 Touch to execute the two touch events. General 1 and Server now 1.5 take to inven and then rez. General 2 and Server 1.5 repeat steps 1 to 3 In Object content click permissions and remove one (does not matter which ), General now 1 and Server 1.5 So it seems that executing an event in the scripts increases the server weight ... as does changing the permissions.
  25. Further 'weird' results. With the two scripts in the prim-set and weighing 1 Li: Change the properties of one of the scripts (i.e. mod/copy/trans) and goes to 2 Li Interact with one of the scripts (touch event), and goes to 2 Li look at it funny ... 2 Li <sigh>
×
×
  • Create New...