linerwhite.blogg.se

Lsl script debugger
Lsl script debugger






lsl script debugger

But it fails to turn them on when detached. The script does turn off the toenails when attached. The two llOwnerSay() calls are there for debugging.

LSL SCRIPT DEBUGGER CODE

This code is inserted in a prim that is attached to the avatar when shoes are attached, and is detached when the shoes are detached. It is needed because the alpha layer, that is needed when shoes are attached, does make the feet disappear but not the toenails. Nevertheless it's worth noting this if you ever start to use other events, like the sensor event, where the parameter does actually tell you how many different results there are, and you then need to use the llDetected* functions with an index other than 0.The above code is intended to turn off toenails on a Slink Physique Redux BOM body when the prim it is in is attached, and on again when detached. Quite a few people tried various tests but it only ever returned a single click. Now, as it happens, a while ago there were questions asked as to whether the touch_start event ever returned more than one click at a time. The index used in the llDetected* functions works just like that for llGetInventoryName, in that it can run from 0 to total_number - 1. All the other llDetectedSomething functions work in the same way.

lsl script debugger

Similarly, llDetectedKey (0) gets the key of whoever was responsible for that first click. total_number tells you how many different clicks there are to be processed in the event, and llDetectedTouchFace(0) gets the number of the face clicked in the first of those clicks. The 0 in that llDetectedTouchFace call is tied to the parameter total_number in the touch_start event. The fact that the touch_start event has been triggered means that one of the faces has been clicked. But if it's meant to work whatever face gets clicked you can leave that out entirely. If it matters which face is clicked (perhaps only one, or some but not all of them) to change the texture then yes, you'll need something like if (llDetectedTouchFace (0) = 0) in there. Incidentally, I'm guessing that the idea is to put some textures in an object and then apply them in sequence to that object whenever it's clicked? There's more, too, to do with filling up the list Pictures and using an index to work though it and where to do that, but scripting can be a real pain to get started with, so I'll stop here. If the face clicked was face 0 the if test will fail, while with any other clicked face it will succeed. LlDetectedTouchFace returns the number of the face that was clicked: anything from 0 to up to 7. I'm not sure how llSetPrimitiveParams (which originally worked only on the prim the script was in) reacts to the PRIM_LINK_TARGET rule (which came along to let you manipulate several different links in a single call to llSetLinkPrimitiveParams), having never experimented with that, though the wiki page that covers this set of functions doesn't seem to say anything about not using it there. When the script calls it here the list Pictures is empty so the function will always return 0 for want of anything better.

lsl script debugger

LlList2Integer takes an item from a list and tries to return it as an integer. And if there were five textures you'd need to call llGetInventoryName (INVENTORY_TEXTURE, 0) for the first, through to llGetInventoryName (INVENTORY_TEXTURE, 4) for the fifth. So if there's only one texture in the inventory llGetInventoryNumber will return 1, and to find that texture's name you need to use its index, 0: llGetInventoryName (INVENTORY_TEXTURE, 0). The individual items are indexed, and those indexes run from 0 to that number - 1. LlGetInventoryNumber will return the number of the type of item specified in the object's inventory, in this case INVENTORY_TEXTURE.








Lsl script debugger