OsNpcRemove
From OpenSimulator
(Difference between revisions)
												
			m  | 
			m (some syntax modification (may be major or minor))  | 
			||
| Line 1: | Line 1: | ||
{{osslfunc  | {{osslfunc  | ||
|threat_level=High  | |threat_level=High  | ||
| − | |function_syntax=osNpcRemove(key npc)  | + | |function_syntax=void osNpcRemove(key npc)  | 
|ossl_example =It might be helpful to erase all of the NPCs in your sim.  | |ossl_example =It might be helpful to erase all of the NPCs in your sim.  | ||
<source lang="lsl">  | <source lang="lsl">  | ||
Revision as of 02:33, 2 July 2011
void osNpcRemove(key npc)
 
 | |
  | |
| Threat Level | High | 
| Permissions | No permissions specified | 
| Extra Delay | No function delay specified | 
| Example(s) | |
It 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 default { touch_start(integer number) { list avatars = llList2ListStrided(osGetAvatarList(), 0, -1, 3); integer i; for (i=0; i<llGetListLength(avatars); i++) { string target = llList2String(avatars, i); osNpcRemove(target); } } } See osNpcCreate for another example.  | |