OsNpcRemove
From OpenSimulator
(Difference between revisions)
m (Added permissions and delay information) |
(Remove void) |
||
Line 3: | Line 3: | ||
|permissions=${XEngine|osslNPC} | |permissions=${XEngine|osslNPC} | ||
|delay=0 | |delay=0 | ||
− | |function_syntax= | + | |function_syntax=osNpcRemove(key npc) |
|ossl_example =This might be helpful to erase all of the NPCs in your sim. | |ossl_example =This might be helpful to erase all of the NPCs in your sim. | ||
<source lang="lsl"> | <source lang="lsl"> |
Revision as of 17:29, 11 December 2018
osNpcRemove(key npc)
| |
| |
Threat Level | High |
Permissions | ${XEngine|osslNPC} |
Extra Delay | 0 seconds |
Example(s) | |
This might be helpful to erase all of the NPCs in your sim.
// sim-wide NPC killer // kill all of NPCs in this SIM // Attempts to kill agents too, but it will silently fail // http://opensimulator.org/wiki/OsNpcRemove default { touch_start(integer number) { list avatars = llList2ListStrided(osGetAvatarList(), 0, -1, 3); integer i; llSay(0,"NPC Removal: No avatars will be harmed or removed in this process!"); for (i=0; i<llGetListLength(avatars); i++) { string target = llList2String(avatars, i); osNpcRemove(target); llSay(0,"NPC Removal: Target "+target); } } } | |
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.
|