@name Bird Army @persist Birds:table Goto:vector Spacing Rows Find:array Range if( first() ){ Find = array("npc_crow","npc_seagull","npc_pigeon") # Find = array("npc_combine_s") # Find = array("npc_headcrab") Spacing = 30 Rows = 3 Range = 2000 runOnKeys(owner(),1) function findbirds(){ Birds = table() findInSphere(owner():pos(),Range) local Ents = findToTable() for( I=1,Ents:count() ){ foreach(K,V:string = Find){ if( V == Ents[I,entity]:type() ){ Birds:pushEntity( Ents[I,entity] ) } } } print( "Selected "+Birds:count()+" birds." ) for( I=1,Birds:count() ){ local V = Birds[I,entity] V:npcRelationship(owner(),"like",999) } } function birdRun(){ local Pos = owner():aimPos() local AE = owner():aimEntity() for( I=0,Birds:count() ){ local V = Birds[I+1,entity] local SL = (I*Spacing)-( Spacing*Rows/2 )-floor(I/Rows)*Rows*Spacing local SR = floor(I/Rows)*Spacing local Left = owner():angles():right()*SL local Right = owner():angles():forward()*-SR local Aim = Pos+Left+Right if( AE ){ V:npcRelationship(AE,"hate",100) V:npcSetTarget(AE) V:npcShoot() } V:npcGoRun(Aim) } } } if( owner():keyReload() ){ findbirds() birdRun() }