OsDie
From OpenSimulator
(Difference between revisions)
(Created) |
(Add exemple) |
||
(10 intermediate revisions by 3 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= | + | |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 14: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. |