OsDie
From OpenSimulator
(Difference between revisions)
(updated the description following this info : http://opensimulator.org/mantis/view.php?id=7911#c31451) |
(Add exemple) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=Low | |threat_level=Low | ||
− | |permissions=${ | + | |permissions=${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
|delay=0 | |delay=0 | ||
− | |function_syntax= | + | |function_syntax= osDie(key objectID) |
− | |description=Deletes an object depending on the target uuid. | + | |description=Deletes an object depending on the target uuid. |
− | + | |ossl_example=<source lang="lsl"> | |
+ | // | ||
+ | // osDie Script Example | ||
+ | // Author: djphil | ||
+ | // | ||
+ | |||
+ | key objectID; | ||
+ | integer switch; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | if (llGetInventoryNumber(INVENTORY_OBJECT)) | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Touch to see osDie usage."); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | llSay(PUBLIC_CHANNEL, "Inventory object missing ..."); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | touch_start(integer number) | ||
+ | { | ||
+ | if (switch =! switch) | ||
+ | { | ||
+ | llRezObject("Object", llGetPos() + <0.0, 0.0, 1.0>, ZERO_VECTOR, ZERO_ROTATION, 0); | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | osDie(objectID); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | object_rez(key uuid) | ||
+ | { | ||
+ | objectID = uuid; | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | |additional_info= This function was added in the 0.9 version of Open Simulator. | ||
+ | Only objects rezzed by the script can be deleted. This function can not be used on attachments. | ||
}} | }} |
Latest revision as of 13:43, 30 November 2020
osDie(key objectID)
| |
Deletes an object depending on the target uuid. | |
Threat Level | Low |
Permissions | ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osDie Script Example // Author: djphil // key objectID; integer switch; default { state_entry() { if (llGetInventoryNumber(INVENTORY_OBJECT)) { llSay(PUBLIC_CHANNEL, "Touch to see osDie usage."); } else { llSay(PUBLIC_CHANNEL, "Inventory object missing ..."); } } touch_start(integer number) { if (switch =! switch) { llRezObject("Object", llGetPos() + <0.0, 0.0, 1.0>, ZERO_VECTOR, ZERO_ROTATION, 0); } else { osDie(objectID); } } object_rez(key uuid) { objectID = uuid; } } | |
Notes | |
This function was added in the 0.9 version of Open Simulator.
Only objects rezzed by the script can be deleted. This function can not be used on attachments. |