Code: Select all
ThinkerIterator GremlinIterator = ThinkerIterator.Create("BarrelGremlin");
BlockThingsIterator BarrelIterator = BlockThingsIterator.Create(self,100.0);
BarrelGremlin grem;
HDBarrel gbar;
HDBarrel barbar;
while(grem = BarrelGremlin(GremlinIterator.Next()))
{
if(grem.master.GetClassName() == "HDBarrel")
{
gbar = HDBarrel(grem.master);
}
else
{
A_Log("Orphaned Gremlin?!");
}
}
if(IsVisible(BarrelIterator.Actor("HDBarrel"),false,null)&& CheckProximity(BarrelIterator.Actor("HDBarrel"),100.0,1,CPXF_SETTARGET))
{
SetStateLabel("BarrelWarn");
}
else if(IsVisible(barbar,false,null)&& CheckProximity(barbar.GetClassName(),100.0,1,CPXF_SETTARGET))
{
SetStateLabel("BarrelSucc");
}
}