I rewrote it simply to refresh myself of each section.leveller wrote:I'm a bit confused why you want to rewrite the whole script again, its working good as it is.
the only thing that deeds to be edited = the last thread, "Camera_action()".
cant remember exactly but i believe a getentarray didn't work or only partial worked.
Yeah, I thought there would be a problem with using a getentarray with the spotter.
I suppose the easiest thing you could maybe use is a big IF statement... for example...
Code: Select all
spotter()
{
spotter = getent("spotter","targetname");
spotter2 = getent("spotter2","targetname");
//etc
while(1)
{
/*********************
if(self.health > 0 && (self isTouching(spotter) || self isTouching(spotter2)))
{
if(self.health > 0)
self.health--;
wait 0.05;
}
else if(self.health < 1)
{
self suicide();
break;
}
else
break;
*********************/
self iprintlnbold("Spotted"); // for testing purposes...
}
wait 0.1;
}
I forgot to remove it. I used that before I added the suicide + break.leveller wrote: [/code]// else //<---Why is that?
// break; //<--And thins one.[/code]