Jump to content

Mollymews

Resident
  • Posts

    5,768
  • Joined

Everything posted by Mollymews

  1. i think the target is the current Facebook users of which there are billions. To further put targeted adverts into the Facebook users feeds like a person goes to a rendering of Tahiti, Las Vegas, London, Paris, etc. get feed adverts from travel agencies, airlines, british pie and beer makers if the person goes into a pub in Metaverse London, Las Vegas hotels, Tahitian beach holiday resorts, French wine companies, etc etc person goes to a new housing showcase in Metaverse Homes. Get feed adverts from garden and home suppliers, home insurance companies and so on person goes to the Metaverse wilderness. Get feed adverts from camping gear suppliers, save the realworld wilderness campaigns, etc i don't think there will be adverts in Facebook Metaverse itself. They will rely on the "Network Effect". Facebook Metaverse is free to play. We Facebook want you to stay on our platforms if there is advertising within the game it will I think come indirectly as giftees/freebies like get a virtual copy of the latest 2022 Toyota to drive. Get some free virtual clothes for your avatar from the Gap. Stay on Facebook and get lots more free stuff, not like them other platforms who want you to pay for virtual stuff when e.v.e.r.y.b.o.d.y knows that all the virtual stuffs wants to be free (as it will be promoted by Facebook)
  2. A transpiler is a pre-processor in this sense. I.e. Java > LSL > CIL languages like C#, VB, Object Pascal, Ruby, Python, Java etc all use named objects with properties and methods: object.property object.method so if I write in Java String s = "Hello world"; int len = s.length(); and this is transpiled to integer len = llStringLength(s); is the same method to get to list texture = Apples.Texture(ALL_SIDES); Apples.Texture = texture; transpiled to the equivalent LSL llGetParams and llSetParams
  3. ah! I see now what you are intending. To write a compiler that outputs CIL which can be executed on the runtime server ? yes ? if you were to go down this path then have a look at OpenSim if you haven't already, to at least have a project server to work with. There have been a number of attempts at different languages over the years, in various states of repair link here: http://opensimulator.org/wiki/Scripting_Languages
  4. If you are going down the path of make LSL look like other languages, I wouldn't mind being able to use named linkset properties. for example there is a linkset with names say: Crate, Apples, Bananas, Carrots. Where Crate is the root prim. Apples is the first linked prim (link number 2) then in code I can write Apples.Texture = [1, "red", SELF, SELF, SELF]; the pre-processor knows to translate this to LSL: llSetLinkPrimitiveParamsFast(LINK_SET, [PRIM_LINK_TARGET, 2, PRIM_TEXTURE, 1, "red", <repeats>, <offsets>, 'rot']); SELF means get the existing <repeats> <offsets> and 'rot' from the prim and insert the values into llSetLink... extended example: Apples.Texture = [1, "red", SELF, SELF, SELF, 2, SELF, SELF,SELF, 90.0]; translation: llSetLinkPrimitiveParamsFast(LINK_SET, [ PRIM_LINK_TARGET, 2, PRIM_TEXTURE, 1, "red", <repeats>, <offsets>, <rot>, PRIM_LINK_TARGET, 2, PRIM_TEXTURE, 2, surface2name", <repeats>, <offsets>, 90.0]); then the most complex: Apples.Texture = [ALL_SIDES, "red", SELF, SELF, SELF]; llSetLinkPrimitiveParamsFast(LINK_SET, [ PRIM_LINK_TARGET, 2, PRIM_TEXTURE, 1, "red", <repeats>, <offsets>, <rot>, PRIM_LINK_TARGET, 2, PRIM_TEXTURE, 2, "red", <repeats>, <offsets>, <rot>, .. for each surface of Apples 3, 4, 5, etc ]); named properties for all the others also. Like Apples.Color = [...] Apples.Text = [...] etc etc then finally Crate.Properties = [ Apples, PRIM_TEXTURE, ALL_SIDES, "green", SELF, SELF, SELF, Bananas, PRIM_TEXTURE, 1, "yellow", SELF, SELF, 90.0, Carrots, PRIM_COLOR, ALL_SIDES, <1.0,0.5,0.0>, SELF] ]; the pre-processor flagging a error when a named link is not found
  5. yes is pretty interesting when get down into the woods of algorithm efficiencies the method you mentioning is used quite a lot with large datasets naively the saving in compare operations is equal to the length minus 1 of the pattern to be found example data "abcdefgbcdefgacdefgab" pattern "gab" find g > a > b find(g) !a !b !c !d !e !f =g find(a) !b find(g) !b !c !d !e !f =g find(a) =a find(b) !c find(g) !a !c !d !e !f =g find(a) =a find(b) =b total compares is 24 pattern "gab" b > g > a find(b) !c !d !e !f !g =b find(g) !f find(b) !c !d !e !f !g !a !c !d !e !f !g !a =b find(g) =g find(a) =a total compares is 22 24 - 22 = length(gab) - 1 the reason is because the find in the 2nd method starts at the 3rd data element, whereas the 1st method starts at the 1st data element algorithms like this typically go b > g > a. So that is decrement to (g) increment to (a) when it goes b > a > g then is decrement to (a) decrement to (g). Which is slower when the pattern to be found is large then the efficiency savings of the 2nd method can be quite significant
  6. adding on here about negative indexing in the go backwards case, negative indexing is more efficient than positive indexing, as negative indexing increments the index. Whereas positive indexing decrements the index. Increment (addition) is more efficient than decrement (subtraction) example of negative indexing deleteStandItems(string stand) { integer x = -llGetListLength(listPoseStands); for ( ; x; ++x) { string singleStand = llList2String(listPoseStands, x); if (stand == llGetSubString(singleStand, 0, length) { listPoseStands = llDeleteSubList(listPoseStands, x, x); return; // when 'stand' is unique then break on found } } } it might not seem much in a single isolated script. But this kind of efficiency gain adds up in large projects a discussion about this previously on here (which I can't find off the top of my head) was with a Mole working on the Bellissaria project they use negative indexing in the Linden Homes where it requires looping backwards thru lists multiply the number of loops by the number of homes on a region then multiply by the number of regions on a server. The server time savings get pretty significant as large projects scale up is the same with our one product that is very popular. 1000s of our one product spread across the servers. Our decrementing loops (as opposed to incrementing loops) are using significantly more server resources than is needed
  7. as wrote, substring "0000" packs to a single space char " ". So does "0001" (integer)"0000" = 0. 0 >> 1 = 0. 0 + 0x20 = 0x20. char(0x20) is " " (integer)"0001' = 1. 1 >> 1 = 0. 0 + 0x20 = 0x20 we can see this with: touch_start(integer num) { key id = NULL_KEY; string s = Key2Packed(id); string ords; integer i; for (i = 0; i < 9; ++i) { ords += " " + (string)llOrd(s, i); } llOwnerSay("s = '" + s + "' ords = " + ords); // says: s = '耠 ' ords = 32800 32 32 32 32 32 32 32 32 key unpacked = Packed2Key(s); llOwnerSay("key= " + (string)id + "\npacked= " + s + "\nunpacked= " + (string)unpacked); } if this is disconcerting then can use another bottom value. Like 0x21 instead of 0x20. 0x8020 becomes 0x8021 or can use 0x800 as the bottom same as UTF2Key does. 0x20 becomes 0x800. 0x8020 becomes 0x8800 ps. if we want to store many packed keys then store them in a string for max. memory efficiency adding 0x8020 to the carry means that every 9th char is greater than 0x801F. The other 8 chars in the packed key are less than 0x8000. Therefore llSubStringIndex will always correctly find a packed key in a string of packed keys pcode example: string pstore = pkey1 + pkey2 + pkey3 + ... + pkey2003 + ... + pkeyN // pstore = "8012345678123456708234567018..." integer index = llSubStringIndex(pstore, pkey3);
  8. it used to be that abandoned land was automatically set to sale, so would show up on the map in yellow. Then Linden stopped doing that.Not sure exactly why. Altho I could make some guesses lots and lots of yellow worries people, the world appears to be hollowing out and sometimes people change their minds after they abandon. There is a fix for this. The Linden land bot could set the parcel back for sale to the previous owner for L$0. left like this for say 72 hours, person could claim it back in that time. After times up, land bot sets it for sale to Anyone at L$1 per sqm. Not sure tho how abandoned group owned land would be handled
  9. i don't mean to be a downer gwenavive, as you are learning quite a lot about LSL thru this project i do think tho that your design is maybe a lot more complicated than it needs to be think of a clothes shop in the real world. There are shelves with folded items, there are hangers with clothes on, there are mannequins displaying clothing, there are shoe boxes with shoes in them, and so on a customer touches a garment display (which is a vendor), say a shoebox. The shoebox rezzes a copy of the shoes from its Contents. The shoes then temp attach to the customer who touched it. As the customer is standing freely, they are able to walk about, sit anywhere, play their own animations (AO, dances, etc) on themselves to see how the garment fits according to their own animation/activity sensibilities the only question then for the shoes is who do I attach myself too? the basics of doing this (which Rolig mentioned earlier) is: // in the shoebox key customer; integer channel = -1234567; // change to whichever default { touch_start(integer num_detected) { customer = llDetectedKey(0); // change to state rezz to stop accepting touches until this customer has their shoes state rezz; } } state rezz { state_entry() { llRezObject("shoes", ..., channel); } object_rez(key id) { // send message containing shoes uuid and the customer uuid string message = (string)id + "|" + (string)customer; llRegionSayTo(id, channel, message); // go back to state default to accept touches again from customers state default; } // in the shoes integer hnd; default { on_rez(integer channel) { // ge uuid of who rezzed me key shoebox = lList2Key(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]); // set up to listen for the shoebox (rezzer) hnd = llListen(channel, "", rezzer, ""); } listen(integer channel, string name, key id, string message) { // we know that message is from the shoebox (rezzer) // parse message to see if it is for us list uuids = llParseString2List(message, ["|"], []); if ((key)llList2String(uuids, 0) == llGetKey()) { // message is for us, so // cancel the listener llListenRemove(hnd); //and get the customer uuid key customer = (key)llList2String(uuids, 1); ... here we temp attach ourself (the shoes) to the customer ... we also need to set up a timer so that should the .... shoes not attach in some time then llDie the shoes } } } the other basic is how to Pay for the shoes. The shoebox rezzer accepts payment. Right-click and pay the shoebox. Shoebox gives a copy of the shoes to the customer in their Inventory when each vendor is self-contained then we don't need a controller, is more intutitive for the customer and the shop keeper can put out as many vendors as they like ps. I just say that this way of doing it has been done before by others before me and is pretty much the standard way to do it
  10. i am reading The Empire Strikes Back : Act 3 the FTA agreed to between the UK and Aotearoa NZ so far The Empire is a empire of three. UK, Australia and Aotearoa NZ. 163 more dominions to go Is a bit like when King Alfred was sitting all by himself with some eels and frogs then set about reconquering the Olde Empire Altho reconquering the USA might be a bit difficult. But never know they might go oooh! you guys brought some boxes of beer to the gunfight. So we surrender and lets have a party. Like it takes tea to seperate people, and beer to bring them back together i am quite pleased about the FTA. Even tho we already got a FTA with Australia, China and the Pacific countries thru the CPTPP. More friends are better than less
  11. if Linden was going to devote resources to this then I would like the capability to add a layer with a script. Something like: llLayerAdd(string name, layertype, integer level); llLayerRemove(integer layertype, integer level); where layer type is BODY_LAYER_TATTOO, BODY_LAYER_ALPHA, BODY_LAYER_UNDERSHIRT, BODY_LAYER_PANTS, ... etc. And BODY_LAYER_SKIN the named layer in object contents if we had this then body makers and body wearers be able to dump the whole shell thing
  12. is always best to make an alternate account. Then add your alternate account to the group. This way there will always be at least two members of the group
  13. sometimes the best results can come from approaching the parcel owner directly. Like: "Hi! Sorry to disturb you. if you ever decide to sell your parcel then I will buy it. I can see myself being very happy living here, is a lovely parcel. I can pay L$x if you are interested. Thank you for your time." if the person is interested in your price then they will reply to your IM
  14. i have no idea how Linden is internally structured but there are a number of Product departments. Like the Marketplace is a different product department to the inworld. The Inworld Product department responsibilities are different from those of the Inworld Product Operations department i don't think VP and Head are the same. It wouldn't make sense to me to downgrade Product from VP status. Not unless the CEO was to take on overall Product responsibility themself, with such a Head of Product in practice being a elevated personal executive assistant, which is total speculation by me
  15. it might be that OP wants the script owner to say hello. Something like: key id = llGetOwner(); dunno exactly might be tho that OP wants the greeting to look like it is coming from the owner and not from the scripted object. Which is not possible, altho is a thing that gets requested for quite often with this i tend to name the greeter object to ":" then in the compact chat view it looks like: [13:18] :: Molly: Hello, how are you? Welcome.
  16. literally the method is: key id = "9bb35653-4ea2-41bb-bdc9-5bb51050f143"; llSay(0, "secondlife:///app/agent/" + (string)id + "/about : Hello, how are you? Welcome."); methods for getting 'id' depend on the situation. Are we getting 'id' thru collision, sensor, sit, touch, etc if you are looking for a pre-written script to do this based on your wants then post in Wanted forum
  17. i should know this. So i better fix it. above
  18. just add on to this when we know that 'stand' is unique then it can be more efficient to use a strided list. Example list listPoseStands = [ "standA", "some|data|for|A", "standB", "some|data|for|B", "standC", "some|data|for|C" ]; addStandItem(string stand, string item) { integer i = llListFindList(listPoseStands, [stand]) + 1; // add 1 to point to the next element containing the data if (i) // >= 1 found, 0 == not found { listPoseStands = llListReplaceList(listPoseStands, [llList2String(listPoseStands, i) + "|" + stand], i, i); } } deleteStandItems(string stand) { integer i = llListFindList(listPoseStands, [stand]); if (~i) // >= 0 found, -1 == not found { listPoseStands = llDeleteSubList(listPoseStands, i, i + 1); // delete both 'stand' and its data element } } string getStandData(string stand) { string result; integer i = llListFindList(listPoseStands, [stand]) + 1; // add 1 to point to the next element containing the data if (i) // >= 1 found, 0 == not found { result = llList2String(listPoseStands, i); } return result; } http://wiki.secondlife.com/wiki/LlListFindList
  19. off the top of my head without testing can directly update the string element using llGetSubString to locate it. Example: addStandItem(string stand, string item) { integer count = llGetListLength(listPoseStands); integer length = llStringLength(stand) - 1; integer x; for (x = 0; x < count; ++x) { string singleStand = llList2String(listPoseStands, x); if (stand == llGetSubString(singleStand, 0, length) { listPoseStands = llListReplaceList(listPoseStands, [singleStand + "|" + item], x, x); return; // when 'stand' is unique then break on found } } } deleteStandItems(string stand) { integer count = llGetListLength(listPoseStands); integer length = llStringLength(stand) - 1; integer x; for (x = 0; x < count; ++x) { string singleStand = llList2String(listPoseStands, x); if (stand == llGetSubString(singleStand, 0, length) { listPoseStands = llDeleteSubList(listPoseStands, x, x); return; // when 'stand' is unique then break on found } } } http://wiki.secondlife.com/wiki/LlGetSubString http://wiki.secondlife.com/wiki/LlDeleteSubList see comments below: The delete method is wrong when 'stand' is not unique, when more than one entry can be 'stand'. Example fix: deleteStandItems(string stand) { integer x = llGetListLength(listPoseStands); integer length = llStringLength(stand) - 1; while (~--x) { string singleStand = llList2String(listPoseStands, x); if (stand == llGetSubString(singleStand, 0, length) { listPoseStands = llDeleteSubList(listPoseStands, x, x); } } }
  20. could be a scammer suggest you file a Support Ticket with Linden to find out if they know anything about the matter
  21. https://releasenotes.secondlife.com/viewer/6.4.23.564530.html
  22. i was looking at this and wondering where I had seen it before then I remembered that it looks like a DSC shunting engine, which is the same as the engine that a shunter person drove off the wharf into the tide recently at the Picton ferry terminal. The shunter wasn't in it when it went over because is remote radio controlled i would like that job, to be the shunter person. A 70 something tonnes toy. brmmm!
  23. the main thing is that you got it to work without getting errors. Is a real sense of achievement, joy and happiness even, when we get to stuff to work. Might not be the most efficient script ever written but I will take working every time over not working. So good on you! on the technicals that you have noticed when a person stands, teleports away, crashes, or logs off while sitting on a object then the system tidies up (stops) all animations started by the object's script automagically. We don't have to script for when this happens about animation priorities when we start an animation, it plays over the top of any animation already playing which has a lower or equal priority. What we see is the animation that has the highest priority, or we see the animation which was last started when the animations are of equal priority. In your case If all of your animations play as expected when you pick them from the pose stand controls then the animations have equal priority. They are all playing, you just see the last one started when animations have different priorities then we have to stop them. Like if a Priority 4 animation is playing and we want to change to a Level 3 animation then we have to stop the Prriority 4 animation so we can see the Priority 3 animation the wiki entry about animation priority is here: http://wiki.secondlife.com/wiki/Animation_Priority
  24. as bobskneif mentions the error is occurring because the script is trying to apply llStopAnimation to an avatar/agent which is not present on the region a way to help understand how to work with permissions is to wrap the permission query in a function. Example: integer hasPerm(key id, integer perm) { // return TRUE when all 3 conditions are met, else return FALSE return (llGetPermissions() & perm == perm) & // script has this permission (llGetPermissionsKey() == id) & // agent id has granted this permission (llGetAgentSize(id) != ZERO_VECTOR); // agent id is present on the region } key agent = lAvatarOnSitTarget(); if (hasPerm(agent, PERMISSION_TRIGGER_ANIMATION) == FALSE) { llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION); } if (hasPerm(agent, PERMISSION_TRIGGER_ANIMATION) == TRUE) { llStartAnimation("anim"); } if (hasPerm(agent, PERMISSION_TRIGGER_ANIMATION) == TRUE) { llStopAnimation("anim"); } edit: typo add: when we get more experience and understanding of the conditions that have to be met, then we can forego using a wrapper function and begin inlining the conditions in our code
×
×
  • Create New...