Jump to content

Ariu Arai

Resident
  • Posts

    143
  • Joined

  • Last visited

Reputation

21 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Does it need to be a HUD? If not, just create an object that is attached to "Avatar Center", then use llSetText to create the title. If you'll only have two titles, you may not even need to use a script. Just upload a texture with the text and apply it to a rectangular prim.
  2. Modulus will also create a math error. if(dividend % divisor == 0)//Division must create an complete number. Check both variables for 0 before continuing.
  3. http://wiki.secondlife.com/wiki/LlPushObject Keep in mind that most sims and parcels have push disabled. In that case, you can only use it on others if you own the land, or use it on yourself.
  4. Just make sure that the object has modify rights. Otherwise you have to use llAllowInventoryDrop(TRUE) to enable adding inventory. However this makes the object public access. So you need to turn that off after the animations are added. Otherwise anyone could drop items into the HUD's inventory.
  5. Attachments inherit the group of the wearer at the time it was attached. Manually changing the group of the attachment usually does not work. Reattaching is the only reliable way to change it.
  6. llSetBuoyancy(1.0); 1.0 = Normal gravity 2.0 = Upwards gravity (You fall upwards) -1.0 = 2x downwards gravity. Etc...
  7. One doesn't have to use the LSL Preprocessor in order to use constants. It's still possible to just use normal integer variables, they just aren't.... Constant. But still, this uses less memory and has better performance than strings. integer const_command_add = 1; integer const_command_remove = 2; integer const_command_do_things = 3;
  8. First, I recommend using the integer/number parameter of llMessageLink to indicate the messages "command". This is more efficient (Since we're only comparing integers and not strings) and uses less memory (Since we don't have to store any extra string values to compare against). If you want better readability, use the LSL Preprocessor so you can define constants. //Sender script llMessageLinked(LINK_THIS, 1, "John Doe", "");//Number param "1" could be used to add avatars. Then the message param contains only the avatar name. //Receiver script below link_message(integer prim, integer num, string msg, key id) { if(num == 1) { //Add } else if(num == 2) { //Remove } else if(num == 3) { //Do the thing, etc... } } LSL has built-in CSV functions. They are llCSV2List("foo,bar") and llList2CSV(["foo", "bar"]). These should fit your needs. llMessageLinked(LINK_THIS, 1, llList2CSV("John Doe,Foo Bar"), ""); link_message(integer prim, integer num, string msg, key id) { if(num == 1) { list new_avs = llCSV2List(msg); //Loop through and add new avs to the list. } } PS: I recommend using avatar UUID's and not names. Avatar names can be changed, so they are not a reliable identifier.
  9. If all you're doing is hosting some text files, I'd definitely recommend just using Amazon S3. https://aws.amazon.com/s3/ Also, SSL/HTTPS is super easy to setup if you have Apache. The Let's Encrypt cert bot does everything for you.
  10. Example: httpCheck = llHTTPRequest("http://warlocc-den.com:1234/sl/online.txt",[],""); You can of course use whichever port number suits your needs. You won't even need to modify your web server, just change the port forwarding settings on your router.
  11. You could try using a different port than 80, 443 or 8080. Those are common web server ports, so your ISP probably interferes with those when it's an incoming connection.
  12. Looks like a self-hosted server. I would recommend getting a professionally hosted server instead. Residential internet usually has very limited uplink capacity, and some ISP's like to try to de-prioritize incoming connections. $5/mo can get you a shared virtual server with most hosting providers. I've personally used Linode and Interserver in the past and had good experiences with them. If you are only hosting text documents (No PHP, databases, etc.), you could even use something like Amazon Web Services S3. That would be cheaper, and would save you the hassle of having to keep a server updated. Note: You may not see any issues with the connection since it's being routed locally. When we test it ourselves, we see the slowness and occasional time out.
  13. llGetUnixTime is easier to implement as it doesn't require parsing a string. The example below sets an integer variable to the time that the script will do its thing (IE: Delete/detach the product). You would probably want to check the time in the on_rez event, but keep in mind that on_rez triggers before changed does. changed(integer change) { if(change & CHANGED_OWNER)//New owner, set a new time limit. { time_limit = llGetUnixTime() + 300;//300 seconds = 5 minutes. } } timer() { if(llGetUnixTime() > time_limit) { //Do stuff here. } }
  14. I can definitely find llListSortStrided being useful, though honestly I'd much rather have nested lists. Though JSON has added that ability, it's just a bit slow.
  15. Qie got most of them. Though it is possible for scripts near a sim border to communicate with scripts on the other side of the border. This is obviously a very narrow use case scenario. There are some "Data Server" services that you can buy from other residents (Look for them on the marketplace). This will let your script store key-value pairs on their database. This means you could use llRequestURL/llRequestSecureURL, then store the resulting URL on that database and have the other script pull that same value.
×
×
  • Create New...