Jump to content

Wandering Soulstar

Resident
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Wandering Soulstar

  1. Jenny .. putting the sleep in both the changed and the state_entry events worked ... strange really but hey if it works :-)
  2. I was wondering about the difference and imagined that it would get a bit memory intensive with the text keys. I thought initially about using the JSON ARRAYs and numbered constants but the rhing thast kept me from doing that is that sections of my code reference and set values in the JSON based on text values that they receive from other sources.
  3. Thanks for the suggestion Xiija, but not the nice solution as this just means that I keep getting the little floating script error advises popping up. And in the changed I cannot restart as the script has other information in it that it has received .. appreciate the thought though!
  4. Thanks Jenny .. I'll try as soon as I get in world, though it does seem strange that the LLGetInventoryName brings back the name and just the actual call to set the ScriptState fails. And that makes some sort of twisted sense in the changed event ... but in the state_entry when the script is just starting up?
  5. Hi Suki, I am sure there are more experienced HUD makers out there, but I have just created my first one, and it is a lot simpler than I thought. In the end a HUD is just a Prim that has been attached to one of the HUD points. No special code really needed unless you want to control the attach point etc.
  6. Just found that as well this is occuring (on occasion) in the default state entry code when I make a copy of a prim with the scripts in it. state_entry() { //Get my comms channels HUD_CHAN_CALL = 0x80000000 | (integer)("0x"+(string)llGetOwner()); HUD_CHAN_RTRN = HUD_CHAN_CALL - 1; //My Name MY_NAME = llGetScriptName(); //Get all the scripts in the prim //Set them all (except me) to not running integer num = llGetInventoryNumber(INVENTORY_SCRIPT); string name; integer x; for (x = 0; x < num; x++) { name = llGetInventoryName(INVENTORY_SCRIPT, x); if (name != MY_NAME) { llSetScriptState(name, FALSE); } } }
  7. Hi All, In the midst of debugging and have another one ... I have a script in a prim and one of the things it wants to do is watch for new scripts being added to it and stop them running. The code that does this is as follows: changed(integer change) { //Could be that scripts have changed .. need to turn them off if (change & CHANGED_INVENTORY) { integer num = llGetInventoryNumber(INVENTORY_SCRIPT); string name; integer x; for (x = 0; x < num; x++) { //If it is not me turn it off name = llGetInventoryName(INVENTORY_SCRIPT, x); if (name != MY_NAME) { llSetScriptState(name, FALSE); } } } } what is happening is that when I drop a script on the prim say called 'new_script' the execution of llSetScriptState raises an error to Debug saying: Could not find script 'new_script'. Now it is obviously there as the only way I find its name is as shown, iterating through the inventory of Scripts. So what am I doing wrong???
  8. LepreKhaun, Thanks for the response, guess I was not clear enough. All the Keys are strings, this is cut from my code and I did not include all the declarations, but every key is a 'Constant' set to equal a unique string. So both SIZE & FACE are strings. Good point on just assigning the vector to SIZE without the sub parts, will have to check the rest of my code to see if there was a reason for that. And as to FACE 'complicating things' it would if a Prim only had one face, but this needs to be able to hold the specific values for an individual face, and ME can have multiple Faces. It does seem that my problem is elsewhere, as the key question I had you answered: 'Your third snippet would write the entire ME object, as you defined it in the other script, to the Value of the BASE_PRIM Key of TEXTURE_PARAMS' And that was what I was wondering, if it was going to be written there as a JSON that I could then query.,
  9. Hi All, I am working on a new project, and am using JSON structures for the first time. One of my modules is having a problem and while I am in the process of debugging, on the train this morning a question came to mind, and since it will likely be hours until I am back home again and able to go in world to continue testing, I thought I'd check here if I am doing something basically wrong. Lets assume in script_main I define the following Global variable: TEXTURE_PARAMS = llList2Json(JSON_OBJECT, [ SET_TYPE, MATCH, HORIZ_AXIS, X, VERT_AXIS, Z, SET_TEXT, (string)FALSE, SET_COLOUR, (string)FALSE, SET_ROT, (string)FALSE, SET_VERT, (string)FALSE, SET_HORIZ, (string)FALSE, BASE_PRIM, EMPTY_STR ]); Key to note, and where I am wondering if there is a problem is in the last node (BASE_PRIM) which is initialized to = "". In another script I execute the following: ME = llList2Json(JSON_OBJECT, [ SIZE, llList2Json(JSON_OBJECT, [ X, (string)size.x, Y, (string)size.y, Z, (string)size.z ]), FACE, llList2Json(JSON_OBJECT, [ NUMBER, (string)touchFace, TEXTURE, llList2String(attribs, 0), COLOUR, (string)llGetColor(touchFace), ROT, llList2String(attribs, 3), HORIZ, (string)texSize.x, VERT, (string)texSize.y ]) ]); llMessageLinked(LINK_THIS, CTRL_CHANNEL, llList2Json(JSON_OBJECT, [ACTION, ST_CLICK, PARAMETER, ME]), NULL_KEY); This message call is then picked up in script_main where after a few checks the following is executed: if (llJsonGetValue(TEXTURE_PARAMS, [BASE_PRIM]) == EMPTY_STR) { //Add the passed ME to the return structure for future Child calls TEXTURE_PARAMS = llJsonSetValue(TEXTURE_PARAMS, [BASE_PRIM], llJsonGetValue(message, [PARAMETER])); response = PARENT; } So, now to my question. Is the set statement valid? What I am trying to do is set the node BASE_PRIM to hold the JSON structure ME that was passed in the linked message call (also as part of a JSON). I am assuming this works but had a doubt as to what this actually looked like under the covers and perhaps was losing some sort of detail in the moving around. Thanks in advance!
  10. Ahh!!! Yes I am using Singularity .. will install another viewer to see if it continues. Thanks for the tip!
  11. Cerise .. Thanks for the suggestion, tried it but no joy :smileysad:
  12. So no solution it seems, and appears to be some kind of glitch. I have tried: 1) With a normal Prim - works fine 2) With a different mesh - still same problem 3) LepreKhauns suggestion - still same problem What is even stranger is that it does not always fail, I ran the sequence 15 times, worked properly 4 times in that run, but no pattern as to when it failed and when it worked. I have an inelegant workaround that involves another prim and guess I'll have to chalk this one up to gremlins in the servers.
  13. This is really weird ...Just got home and went to test some more .. and now working fine .. after two days of problems <sigh> No code changes, same mesh prim ... Gremlins
  14. Rolig - Yep already checked the value of HINGE_FACE and it is correct, like I said, in my 'debug' I can see that it is not calling llSetAlpha for the face defined in HINGE_FACE. Emma - When I get some time tonight or tomorrow I am going to try it with another mesh, and a standard prim. Though I am sure it will work with the standard prim, the mesh who knows. I may not have been clear enough, but the realy wierd thing is that occasionally the code does work, maybe 5% of the time ... so very wierd. And to make things more confusing, there is another spot in my code where I set the Alpha back to 0% (1.0) and there I have another face that I always want full Alpha, so I skip the setting, and that works!
  15. Hi all, I am encountering a strange problem with a bit of code I have and cannot for the life of me find why. I have a single object (mesh) where I want to on occasion set the Alpha of all the faces except one to 100%. The following snippet is what does this: integer numFaces = llGetNumberOfSides(); integer x; for (x = 0; x < numFaces; x++) { if (x != HINGE_FACE) { llSetAlpha(0.0, x); } } The problem is that most of the time (not always) all the faces go to 100%. I have put in a sniffer and can see that when the face in question comes up in the loop it does not enter and execute the llSetAlpha statement, but the result is still said face going to 100% Alpha. Any ideas?
  16. Not able to go in-world at the moment to remember the name of one I used that was very good. But as to your comment on not being able to sell the builds, you only need the scripts in the prims while you are aligning the textures. Once you have finished you remove the scripts and can thus sell the resulting build.
  17. Hi All, I am an experience home builder looking for my next project. This is something I do for enjoyment, not to make a living, so I am not looking to be paid for this. That said, I am looking for something that is interesting to do ... so challenge me :-) I only do houses and some land decoration, to get an ideacontact me inworld and I'll give you an LM to check out my current home to see what I have done there. I am not interested in building stores, clubs, or the like. So, if you want that special custom home for your land, one that no one else in SL has, then give me a shout, I can show you my recent work and we can talk :-) Wanda Soulstar (Wandering Soulstar)
  18. Hey Valareos .. my appologies I should have paid closer attention to your explanation :womanembarrassed:
  19. While Tier rental is a great idea, and there have been many individuals in the past that have done this, you really should get your numbers correct. Your example of 1/4 sim costing $125 in tier is incorrect. 1/2 a sim (32.768 sqm) costs $125 a month, 1/4 sim costs only $75 a month, so by your numbers it is $26 a month more expensive to rent tier from you.
  20. Hola Anreas .. depende de lo que buscas quizas puedo ayudar. Mandame un mensaje inworld y nos vemos para hablar.
  21. Thanks all! I tried TDD123's suggestion and though trying to see the differences bewteen the seetings in the Advanced menu was difficult (not the same between Singularity and LL cur version) I decided to selectively disable certain ones that were appearing in the Singularity Menu. The first one I tried, 'Aggresive Alpha Masking' seems to do the trick, though I do wonder what I might be losing because of this. Czari - Went to get an Alpha version and just so happens that they had realeased a new version last night (1.8.1), the problem still existed there (prior to the change noted above) Hutson - Where do I set what to 1 Transparency?
  22. Hi All, I have a strange thing occuring in the Singularity Viewer (v1.8.0) that does not occur in other viewers (current LL, Firestorm 4.4). Basically A certain type of texture that I have created is not displaying properly in the Viewer. I have tried in the LL viewer and works fine. If I clear cache, and occasionally on log-on, the texture looks fine until I get closer to it, after that point it will not look correct. The texture was created in GIMP, with a transparent background (Alpha), and I draw a black line around the edge and blur it. The following files show what occurs to the texture: deck shdw 1238x1410 - The file uploaded as a texture initial - applied to a prim and viewed at a distance correct - viewed close up in the LL or Firestorm viewers fail - viewed close up in singularity
  23. Thanks Trinity! Just saw another thread on this as well, had missed that change as one of the new 'features' of SSB :-)
×
×
  • Create New...