Change font size
It is currently Sun May 19, 2013 11:19 pm

Forum rules


Image



Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: NPC Scripts
PostPosted: Mon Jan 30, 2012 1:19 am 
Furious Typer
User avatar

Joined: Mon Jul 12, 2010 4:43 am
Posts: 124
I will be sharing alot more NPC scripts here when I get them fully tested

Sometimes when your working with NPCs, you get orphaned ones while testing because you edited your script without killing the NPC first, and lose the key.

here is a small basic NPC removal script to remove NPCs without restarting sim...

(note: this will only remove NPC's you have created.)

Code:
//Kill NPC's from Region
float range= 512.0;
default
{
    state_entry(){
         llSetText("Rogue NPC Cleanup\n\n(Click me to remove\nall NPC's from region)",<1.0,1.0,0.0>,1);
    }
       

    touch_start(integer anumber) {
        llSensor("",NULL_KEY,NPC, range ,PI);   
    }

    sensor(integer detected){
        integer i;
        for (i = 0; i < detected; i++){
            llSay(0,(string)llDetectedName(i)+" Is being Killed!!");
            for (i = 0; i < detected; i++){
                osNpcRemove (llDetectedKey(i));
            }
        }
    }
}


Top
 Profile  
 
 Post subject: Re: NPC Scripts
PostPosted: Mon Apr 16, 2012 2:43 pm 
Furious Typer

Joined: Mon Jan 16, 2012 1:44 pm
Posts: 83
We need more of your amazing scrpits:)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


Who is online

Users browsing this forum: legacy_google [bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net