Dirty McLean
- Music producer, codemonkey, and love machine (but not necessarily in that order)
- Admires those who teach for free (then pities those who get what they paid for)
- Once ate 2 Grand Slam breakfasts in a single sitting, sans the eggs (they were runny)
Things everyone should know:
- Never edit an attachment while it is attached. If the sim crashes you will lose all of your progress, including the scripts and inventory. Rapidly detaching and reattaching inventory can also cause the loss of your work if done directly between your avatar and your inventory (ie, not from the ground).
- Never use a llListen where a link_message will do. Don't cheat yourself by thinking listeners are easier. More types of data can be passed directly with llMessageLinked than with any other form of communication. Nothing is as fast either. It's not hard, and you will be doing your part to conserve resources.
- You do not need to use an alpha-transparent texture to make part or all of a prim invisible. Use llSetPrimitiveParams and PRIM_COLOR, supplying a value of 0.0 for the float param. This will make the specified side(s) 100% transparent, which is impossible to do by hand.
Bugs / Annoyances:
- The animation state "Standing Up" (see llGetAnimation) plays an animation named "standup" which can not be stopped using llStopAnimation. This is presumably a flimsy workaround by LL for a bug that used to occur when you stopped this animation (you would be stuck in the "Standing Up" animation state and not have controls until you sit/stand).
- When using llTakeControls, Even if you supply a FALSE value to the pass_on parameter, the camera will revert to the default position behind your avatar upon using CONTROL_UP, etc. Also, CONTROL_ROT_LEFT and CONTROL_ROT_RIGHT will function normally even though, as the documentation states, a FALSE pass_on value should block the sending of these keys to the user interface.
- If a touch event contains llMapDestination, the map is sent to the detected avatar with the index 0. It is nice that we can send map destinations to other avatars, but we should be able to define which number it is sent to (or MAP_SELF for the owner).
- Sometimes after teleporting (perhaps especially from the map), after you arrive, a teleport happens again for no apparent reason, and subsequently fails to complete. After this happens, you have no use of controls, although you can still be pushed around by other users.
- Scripts that don't have an "idle" state can be set off erratically. If, for example, you have a particle script that sets off bursts unexpectedly every now and then, this is probably the case. This seems to be common with llSetBuoyancy as well. (edit: I have seen less of this recently, although it does still happen, especially under heavy sim load.)
Requests / Wishlist:
- Fix the problems listed above!
- Phantom child prims... I am not sure why this is so hard anymore, considering that child prims can be floppy (and inherently phantom that way).
- REFERENCE SECTION -
Event Guide for Attachments:
| attach from inventory | attach from ground | drop attachment to ground | teleport while attached |
on_rez? | YES | NO | NO | NO |
attach? | YES | YES | YES | NO |
changed? | NO | NO | NO | YES |
llHTTPRequest Example:
//LSL HTTP POST Example
//by Dirty McLean
//June 30, 2006
//Use freely!
default {
state_entry() {
//replace this url with your own
string url = "http://mysite.com/myscript.php";
//set params to [] for GET requests
list params = [HTTP_METHOD,"POST",HTTP_MIMETYPE,"application/x-www-form-urlencoded"];
//set the body to your list of variables separated by semicolons
string body = "var1=test1&var2=test2";
llOwnerSay("Requesting "+url);
llHTTPRequest(url,params,body);
}
http_response(key query, integer status, list meta, string body) {
//say the page title only
string title;
list split = llParseString2List(body,["<title>", "</title>"],[]);
if (llGetListLength(split) > 1) title = llList2String(split,1);
else title = "unknown";
llOwnerSay("Page title: "+title);
//say each line received
list lines = llParseString2List(body,["\r\n", "\r", "\n"],[]);
integer i = 0;
integer len = llGetListLength(lines);
for (;i<len;++i) llOwnerSay(llList2String(lines,i));
}
}
You can test the above code with the following PHP script:
<?php
echo $_POST['var1']."\r\n";
echo $_POST['var2']."\r\n";
?>
Jasa SEO Murah Jasa SEO Jasa Google Adwords Jasa Adwords Google Adwords Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Govr Edo Ziedo Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Penumbuh Rambut Kursus SEO Jam Tangan Casio Grosir Baju Bisnis Online Kerupuk Kulit Social Bookmark Kumpulan Puisi WBC Wonogiri Penumbuh Rambut Jam Tangan Murah Jam Tangan Murah Jam Tangan Casio Penumbuh Rambut Kerupuk Kulit Alat Kantor Laku.com Belanja Online Grosir Eceran Murah dan Aman Jasa SEO Model Jilbab Fine Tableware Permanent Hair Removal island investment development professional makeup artist bali private villa sewa mobil jakarta murah Jual rumah Jakarta Contact Lens Technology