Modme Forums
Menu:

Trigger Radius

Game Modding | Call of Duty: Black Ops 3 | Scripting


eDeK:

I spawn a "Trigger Radius" and i can kill the player, but no detect/kill the zombies when they touch the trigger.
I tried a various lines but still no work for kill zombies.

function mk_pole_trap_patch_damage()
{ 
    while ( 1 )
    {
        self waittill( "trigger", e_entity );

        if ( IS_TRUE( e_entity.mk_pole_trap_patch_immune ) )
            continue;             

        if ( IsPlayer( e_entity ) )
        {
            if ( zm_utility::is_player_valid( e_entity ) )
            {             
                e_entity DoDamage( self.health + 666, e_entity.origin, undefined, undefined, self.n_pole_damage_type );                             
            }
        }

        //NO WORK
        else
               e_entity DoDamage( self.health + 666, e_entity.origin, undefined, undefined, self.n_pole_damage_type );                 
       
       //NO WORK 
        a_ai = GetAITeamArray( "axis" );

        foreach( ai in a_ai )
        {         
            if ( DistanceSquared( self.origin, ai.origin ) <= 15 )
            {
                ai DoDamage( self.health + 666, e_entity.origin, undefined, undefined, self.n_pole_damage_type );         
            }
        }                                             
    }     
}


KillJoy:

in sorry i used this if the game piece moved backwards and zombies got stuck behind it

a_ai_enemies = GetAITeamArray( "axis" );
        for(k=0;k<a_ai_enemies.size;k++)

        if(a_ai_enemies[k] IsTouching(zone))
        {
            IPrintLnBold("zombie in zone");
        }


eDeK:

Thanks for reply but dont work, this write me 24 times "zombie in zone" when i touched the "trigger radius", nothing happen when a zombie touch the trigger.
i gonna still trying...


eDeK:

Fixed! Now works.