-
Posts
80 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by GloriaGlitter
-
Can I specify direction avatar faces when they are unseated?
GloriaGlitter replied to GloriaGlitter's topic in LSL Scripting
Thanks for your replies. In my application it was a 'nice to have' and more elegant operation if I could have controled the unsit direction but not crucial. Thanks for your input -
If I creat a new object, then it is positioned a ground level, even if on a platform say 500 mtrs up. If I edit the object and raise it up some distance and then take it back into inventory, when I rez it again, it will be the same height above the ground. What I would like to do is to find out the height of the platform so that I can adjust the position of my object so that it is back on the ground again e.g. llSetPos(llGetPos()-<0,0,HeightAboveGround>). Is the height of a platform available as a variable or as a calculated value so that I can calculate vector 'HeightAboveGround'? Thanks
-
I have a script in an object such that when an avatar sits on this object, I can issue a command on a channel that the script listens to which will then move the object with the seated avatar. When the object arrives at the destination the avatar is unseated using llUnSit. I have noticed that whatever direction the object is facing when it arrives, when the avatar is unseated it always faces forwards along x-axis. Ideally I would like the avatar to stand facing forwards of the objects direction. Is this possible or is this a feature of llUnSit that unseated avatars always face the same direction irrespective of the object position? I did notice a quirk which fooled me when I was testing my scripts. If the avatar that is seated is me, then I do face the same direction of the object when I get unseated. It was only when other avatars started to use this and it was me issuing the command to move the object, that I noticed that they all were unseated facing along x-axis. Thanks
-
Many thanks for quick responses to my intial question. The vector offset multiplied by the llGetRot was the solution to my issue. I had thought it was going to be a lot scarier than that having read the Rotation wiki with degrees to radians, quaternions and euler calculations - phew. Cheers
-
I wonder if someone might have some experience working with rotations to share as it has been sending me round the bend trying to figure this one out: I have three objects - a rezzer objectwhich includes a script to rezz two other objects contained in the inventory of the rezzer object- one is a platform and the other is a box. If I set the rezzer at rotation <0,0,0> and rezz the two other objects, the platform rezzes so that the rezzer object is in the centre and the box object is offset about 4 meters to the left of the rezzer. llRezObject("Platform", llGetPos(), <0.0,0.0,0.0>, llGetRot(), 0); llRezObject("Box", llGetPos() + <-4.0,0.0,0.0>, <0.0,0.0,0.0>, llGetRot(), 0); If I then rotate the rezzer, say by 45 degrees, and rez the two objects, the platform correctly rotates in line with the rezzer as it is centred, but the Box stays where it is but rotates around its own z axis. What I really want is the box to move in an arc so it stays in the same relative position. I know I need to somehow take account of the rezzer rotation and apply a calculation to the x and y values in the offset vector of <-4.0, 0.0.,0.0>. If I move the box physically using edit to the place where I want it to go to, I can see that I need to apply approx <1.22, 2.85, 0> to the offset to give a new offset of <-2.78, 2.85, 0>. Have gone through the wiki on things related to rotations but couldn't see anything that seemed to answrer my question which is: How do I generate the new x,y offset from the changed rotation value of the rezzer object? Thanks.
-
Is it possible to read an inventory object's description
GloriaGlitter replied to GloriaGlitter's topic in LSL Scripting
Thanks Rolig - its not so much that I want to edit the inventory item, just want to read its description. Since I can read the inventory item name with my script, was hoping I could read the description as well. I could get round this by using a notecard but it would have been more elegant and simpler to be able to read the description. But if it can't be done then I'll find another way. -
I am making a vendor that my group members can use to sell their own creations. With the vendor set to group share, the members can drop their object into the vendor's inventory and apply their texture to the vendor. The script uses the object name and the object owner's name but I would like to know if there is also a way to read the inventory object's description as that is ideally where I'd like my users to write the price of their creation which can then be read by the script rather than editing the script to set a price variable.
-
Have solved the problem. When I changed preferences to put error messages into local chat so I could click the object name - I was getting <0,0,0> so I assumed that it wasn't in my region. I looked around on neighbouring parcels but couldnt find anything. Then I had inspiration to check sky rooms. Found the object at 2800 mtrs high. Reset scripts and problem solved. The thing that confused was that the debug messages kept coming despite the distance but search tools couldn't find it and the coordinates was showing as <0,0,0>. Thanks to everyone that offered ideas.
-
Thanks for your suggestions. Have searched for lost poseballs using Search Area and turning on transparent - nothing around. Its not anything I'm wearing. No objects with warning icons lurking around. Had sim owner search as well but he couldn't find anything either. The deleted furniture item in question didn't use poseballs but avsitter system. It seems to defy logic - I get the script error message every 30 seconds when on the sim I'm renting - it says the name of the furniture piece giving out the script error even though its deleted and doesn't show up in search. Seems like a ghost.
-
Hi Codex - thanks for your suggestion. Its not something I'm wearing - I did check that. The messages only start once I am on my sim and not anywhere else. It comes from a piece of scripted furniture that I have since deleted but the debug messages still come every 30 seconds. Apart from getting rid of my sim which is a bit drastic, I can't think of anything else to try.
-
Hello there - wonder if anyone has a solution to this: I am getting this message "Script trying to trigger animations but PERMISSION_TRIGGER_ANIMATION permission not set" a few times a minute while on my sim. Have deleted the offending object but message persits. Have tried 'Stop Avatar Animations & Revoke Permissions' but didn't help. Was hoping region reset would get rid of it but it didn't. Have tried a couple of viewers (Firestorm & SecondLife) but still get the message. Grateful for any ideas how to stop this. Thanks
-
yup - llGetOwner() did the trick, thanks.
-
Hi everyione - I wanted a simple script that offered a user a 'read me' notecard when they rezzed an object from inventory. I expected the following to work but was surprised that it didn't. Is it a security concern that prevents giving inventory on rez? on_rez(integer i) { llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_NOTECARD, 0)); }
-
Thanks animats - also found your thread 'How to make clothing for animesh' in the Animesh section very useful too.
-
Hi there - I've not wandered into the area of creating clothing before so hopefully my question makes sense. I have purchased a full perm female Animesh bot for my AI project. This bot comes with a menu where some different clothing textures can be applied. Most of these outfits are rather skimpy so I asked the Animesh creator if they could add a business like pant suit to the menu. They said there was two options - find a mesh clothing designer that could rig an outfit to their bot model or look on MP for suitable system clothing and then see if the creator would supply a .dae file. I did find one such store still selling system clothes but have not been able to reach the designer yet to ask about .dae files. The Animesh creator has given me the bot shape which I have downloaded as an xml file. I have also downloaded Blender. If I can get a dae file, is it just a matter of basically uploading the dae and the xml files into Avastar/Blender, pressing a few buttons and then voila new clothing files are created that can be imported into SL? I doubt it would be as simple as that. Alternatively, can anyone point me in the direction of someone that might offer a service that I could buy into, to achieve what I want? Thanks.
-
doh - what a newbie error - you were right - there was a spurious space in the data that didn't show when I checked via llOwnerSay. All sorted now. Thanks
-
I've started experimenting with bringing in live data via API calls to external services, particularly those that present their output in json format. This is to provide extra functionality to my AI bot. So far I've got live weather reports working very nicely. Currently I'm working with live currency exchange rates. My question is can I use a string variable in my llJsonGetValue statement in place of a value? To explain further, after the http call, variable 'body' is set to {"rates":{"USD":1,"AED":3.67,"ARS":78.93,"AUD":1.38,"GBP":0.761,"GTQ":7.78,"HKD":7.75,"HRK":6.37}} (actual list has over 100 currencies) Variable 'exchange_curr' is set to whatever currency the user is interested in, e.g. "GBP". rate = llJsonGetValue( body, ["rates", "GBP"]) gives the desired result whereas rate = llJsonGetValue( body, ["rates", exchange_curr]) fails to provide a result. Does it always have to be actual data like "GBP" in the json expression and not a variable like 'exchange_curr' that holds this data?
-
Hi there - I have ventured onto Market Place for the first time and my first product is an AI Chatbot which can be used for store greeter, club receptionist, etc. Its at late beta stage and needs a few users to try it out so its listed at just L$1 for a short while. For some reason the MP algorithm said something in my listing made it at level Moderate. Initially I didn't mind but I've since found that anyone I give the link to, can't find it unless they log in to MP and have the correct maturity level. And so I realise now, that this is a problem. I can't think what words I have in the text that might warrant being ranked Moderate. Would be grateful for any suggestions as to what words are triggering this so that I can change them. Here is the link: https://marketplace.secondlife.com/p/SL-Chatbot-Conversational-Animated-Chatbot-Greeter-Receptionist-Bar-Tender-Includes-1000-question-triva-quiz/20421231 Thanks
-
Is it possible to script an object so that touching it sets the home location? I've searched around the forum and MP. I'm assuming since there isn't a short cut for it that its probably not possible.
-
Ah - knew it was a simple error. Thanks for that Rolig
-
Hi there - this has me puzzled: I have written a little function to capitalize the first character in a sentence. I get an Error: Type mismatch on the last but one line 'testitem = capfirstlet (testitem)' but as far as I can see, I have only been dealing with strings. I must be missing something obvious. string testitem ="phil went shopping"; capfirstlet (string src) { string firstlet = llGetSubString(src, 0, 0); firstlet = llToUpper(firstlet); src = firstlet+ llGetSubString(src, 1, -1); } default { touch_start(integer total_number) { testitem = capfirstlet (testitem); llOwnerSay(testitem); } }
-
Number of seconds between a future date/time and now
GloriaGlitter replied to GloriaGlitter's topic in LSL Scripting
Some great ideas here for me to work with. Thanks for the contributions - I'll report back here as I make progress. -
Number of seconds between a future date/time and now
GloriaGlitter replied to GloriaGlitter's topic in LSL Scripting
Hi Wulfie - up to 1 year in the future. I want to start with a variable that contained the future date/time first. From this date/time, I want to calculate the number of seconds between now and then. [Edit] I've since found some functions in the Date Library - in particular 'gday' which turns a date into a date number. Looks like I can do gday(y2,m2,d2) - gday(y1,m1,d1) which will give me the number of days between dates (x 24 x 60 x 60 to get seconds) - I'll now work on the time element to determine number of extra seconds to add or subtract to get final result - on right path?