OsNpcRemove
From OpenSimulator
(Difference between revisions)
(Fix Layout) |
m (Change See Also) |
||
(2 intermediate revisions by one user not shown) | |||
Line 45: | Line 45: | ||
} | } | ||
</source> | </source> | ||
− | |additional_info=If the '''NPC''' is the UUID of any other type of agent (i.e. a user's regular avatar, not an NPC), this function will silently fail, not erasing existing avatar. < | + | |additional_info=If the '''NPC''' is the UUID of any other type of agent (i.e. a user's regular avatar, not an NPC), this function will silently fail, not erasing existing avatar.<br> |
− | + | In other words, this function does not work on regular avatars but only on NPCs | |
}} | }} | ||
+ | == See Also == | ||
+ | * [[osNpcCreate]] | ||
+ | * [[osNpcRemove]] |
Latest revision as of 18:52, 5 December 2020
osNpcRemove(key npc)
| |
| |
Threat Level | High |
Permissions | ${OSSL |
Extra Delay | 0 seconds |
Example(s) | |
This might be helpful to erase all of the NPCs in your sim.
// // osNpcRemove Script Exemple // Author: djphil // default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osNpcRemove usage."); } touch_start(integer number) { list npcs = llList2ListStrided(osGetNPCList(), 0, -1, 3); if (npcs == []) { llSay(PUBLIC_CHANNEL, "There is no NPC's in this sim currently."); } else { integer length = llGetListLength(npcs); integer i; for (i = 0; i < length; i++) { key npc = llList2Key(npcs, i); llSay(PUBLIC_CHANNEL, "Remove NPC: " + npc + " (" + llKey2Name(npc) + ")."); osNpcSay(npc, "Goodbye!"); osNpcRemove(npc); } } } } | |
Notes | |
If the NPC is the UUID of any other type of agent (i.e. a user's regular avatar, not an NPC), this function will silently fail, not erasing existing avatar. In other words, this function does not work on regular avatars but only on NPCs |
[edit] See Also
- osNpcCreate
- osNpcRemove