Napalm Zombie Problem

broken avatar :(
Created 407 days ago
by Joeycx
0 Members and 1 Guest are viewing this topic.
492 views
broken avatar :(
×
broken avatar :(
Location: vn
Date Registered: 23 February 2015
Last active: 71 days ago
Posts
208
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Personal Quote
bịnh thần kinh
×
Joeycx's Groups
Joeycx's Contact & Social Links
Hi! I'm recently added the napalm zombie created by shippuden1592, but the napalm zombie spawns and walks towards me for a couple of seconds before exploding. I have set everything correctly but nothing seemed to work. If anyone who used his napalm zombie, got it to work or have answers as any help is appreciated!

My _zombiemode_ai_napalm (I added a info_volume like he instructed with the script_noteworthy of zone_1, but i use triggers for my zones instead of info_volume so i'm wondering if it had something to do with that as well. the player_zone line "napalm = Getentarray( "player_zone", "script_noteworthy" );" is changed to zone_1 as well. I also put the napalm in my second zone(zone_1 is my second zone) instead of the start_zone, so any context i could give to solve this.

[noae]
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include animscripts\Utility;

#using_animtree( "generic_human" );

init()
{
//level.scr_anim["napalm"]["walk"] = %Ai_walk_weary_a; //Animacion parecida al napalm ( cambiar si les gusta mejor )
level.scr_anim["napalm"]["walk"] = %ai_zombie_napalm_run; //Animacion oficial napalm ( cambiar si les gusta mejor )
level.scr_anim["napalm"]["explode"] = %ai_zombie_napalm_attack_01;

level._zombie_napalm_fire_death["zombie"] = [];
level._zombie_napalm_fire_death["zombie"][0] = %ai_flame_death_a;
level._zombie_napalm_fire_death["zombie"][1] = %ai_flame_death_b;
level._zombie_napalm_fire_death["zombie"][2] = %ai_flame_death_c;
level._zombie_napalm_fire_death["zombie"][3] = %ai_flame_death_d;
level._zombie_napalm_fire_death["zombie"][4] = %ai_flame_death_e;
level._zombie_napalm_fire_death["zombie"][5] = %ai_flame_death_f;
level._zombie_napalm_fire_death["zombie"][6] = %ai_flame_death_g;
level._zombie_napalm_fire_death["zombie"][7] = %ai_flame_death_h;

level._effect[ "napalm_spawn" ] = LoadFX( "napalm/napalm_boss_spawn" );
level._effect[ "napalm_fire_trap" ] = LoadFX( "napalm/napalm_fire_trap" );
level._effect[ "napalm_explo" ] = LoadFX( "explosions/default_explosion" );
level._effect[ "napalm_fire_foot" ] = LoadFX( "napalm/napalm_foot" );

set_zombie_var( "napalm_first_round", 10 ); //Ronda a iniciar + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] )
set_zombie_var( "napalm_rnd_max", 3 ); //Numero maximo de ronda entre el proximo spawn
set_zombie_var( "napalm_rnd_min", 5 ); //Numero menor de rondas entre el proximo spawn
set_zombie_var( "napalm_health_multiplier", 50 ); //Incremento de vida
set_zombie_var( "napalm_alive", false ); //Napal vivo/muerto
set_zombie_var( "napalm_explo_radius_plr", 20 ); //Napalm explotara cuando esta cercano al jugador ( a 80 de distancia )
set_zombie_var( "napalm_vision_radius", 1000 ); //Rango de Vision
set_zombie_var( "napalm_trap_damage", 60 ); //Daño trampa a jugador / con PHP no afecta
set_zombie_var( "napalm_trap_radius", 90 ); //Rango de la trampa (esta a corde con el tiempo del fx)
set_zombie_var( "trap_time", 15 ); //Tiempo de la trampa (esta a corde con el tiempo del fx)

precache_models();
thread maps\_zombiemode_ai_napalm::main();
}

precache_models()
{
precachemodel( "bo1_c_viet_zombie_napalm" );
precachemodel( "bo1_c_viet_zombie_napalm_head" );
}

main()
{
flag_wait("all_players_connected");

level thread wait_for_spawn();
level thread spawn_napalm();
}

wait_for_spawn()
{
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] );
// level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;

// iprintlnbold("Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );
while( 1 )
{
if( flag("dog_round" ) )
{
wait(7);
while( level.dog_intermission )
{
wait(0.5);
}
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;
// iprintlnbold("Proxima Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );
}
else
{
if( level.round_number >= level.zombie_vars["napalm_first_round"] )
level.napalm_active_on = true;
else
level.napalm_active_on = undefined;
}

wait(0.5);
}
}

spawn_napalm()
{
napalm_points = GetEntArray( "napalm_spawn", "targetname" );
chosen_spot = undefined;

if( !IsDefined( napalm_points ) || napalm_points.size == 0 )
return;

while( 1 )
{
if( isDefined( level.napalm_active_on ) && level.napalm_active_on == true )
{
if( !level.zombie_vars["napalm_alive"] )
{
wait RandomIntRange(10, 15); //Tiempo de espera en hacer respawn

napalm_points = array_randomize( napalm_points );

for( i = 0; i < napalm_points.size; i++ )
{
_napalm = spawn( "script_model", napalm_points[i].origin );
_napalm SetModel( "tag_origin" );
_napalm linkTo( napalm_points[i] );
_napalm.angles = napalm_points[i].angles;
_napalm.origin = napalm_points[i].origin;

if( zone_active( _napalm ) )
{
chosen_spot = napalm_points[i];
break;
}
wait 0.01;
_napalm delete();
}
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] );

// level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;
// iprintlnbold("Proxima Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );

level.zombie_vars["napalm_alive"] = true;
napalm = spawn_zombie( chosen_spot );
napalm thread maps\_zombiemode::round_spawn_failsafe();
napalm thread napalm_prespawn();
}
}
wait(0.5);
}
}

zone_active( np )
{
napalm = Getentarray( "zone_1", "script_noteworthy" ); //Reemplazar por el script_noteworthy de tu info_volume
zone = undefined;
poi = false;

for( i=0; i < napalm.size; i++ )
{
if( np istouching( napalm[i]) )
{
zone = napalm[i].targetname;
if( level.zones[ napalm[i].targetname ].is_enabled )
{
poi = true;
}
}
}
return poi;
}

napalm_prespawn()
{
thread players_disableflamescreen();

self.animname = "zombie";

self maps\_zombiemode_spawner::zombie_spawn_init( true );
self thread maps\_zombiemode_spawner::zombie_think();
        self maps\_zombiemode_spawner::zombie_setup_attack_properties();
        self thread maps\_zombiemode_spawner::find_flesh();

self.gib_override = false;
  self.gibbed = true;
self.no_damage_points = true;
self.ignore_enemy_count = true;
self.is_napalm = true;
self.shrinkray_napalm = true;

self.maxhealth = 100000;
self.health = 100000;
// iprintlnbold("Napalm Vida ---> " + self.health );

/*==== Spawn ====*/
level thread napalm_area_effect( self.origin, "napalm_spawn" );
//level thread napalm_plr_sound( "spawn" );

self playsound("ignite");
self playsound( "evt_napalm_zombie_spawn" );

speed = "run";
spawn_anim = random(level._zombie_rise_anims["zombie"][1][speed]);
time = getanimlength(spawn_anim);
self animscripted("napalm_spawn", self.origin + (0, 0, -45), self.angles, spawn_anim, "normal");
wait( time );
self thread napalm_health();
/*==== End Spawn ====*/

self thread maps\_zombiemode_spawner::zombie_eye_glow_stop();

self thread napalm_walk();
self thread napalm_trail();
self thread napalm_vision();
self thread napalm_vox();
self thread napalm_player();
self thread napalm_death();
}

napalm_health()
{
players = get_players();
  self.maxhealth = level.zombie_health * (players.size * level.zombie_vars["napalm_health_multiplier"] );
  self.health = level.zombie_health * (players.size * level.zombie_vars["napalm_health_multiplier"] );

// iprintlnbold("Napalm Vida ---> " + self.health );
}

napalm_walk()
{
self endon( "death" );

while( isDefined( self ) )
{
walk = true;
zombies = getaiarray( "axis" );
while( zombies.size > 0 )
{
if( zombies.size == 1 || self.health < ( self.maxhealth / 4 ))
{
var = randomintrange(1, 4);
self set_run_anim( "sprint" + var );                       
self.run_combatanim = level.scr_anim[self.animname]["sprint" + var];
walk = false;
}
wait(0.05);
zombies = getaiarray("axis");
if( isDefined( walk ) )
{
self set_run_anim( "walk" + 2);                       
self.run_combatanim = level.scr_anim["napalm"]["walk"];
}
}

wait_network_frame();
}
}

napalm_player()
{
self endon( "death" );

while(1)
{
players = getplayers();

for(i=0;i<players.size;i++)
{
if( self.shrinkray_napalm == true && Distance( self.origin, players[i].origin ) <= level.zombie_vars["napalm_explo_radius_plr"])
        {
self playsound( "evt_napalm_zombie_charge" );

//explode_wind_up = %ai_zombie_taunts_5f;
explode_wind_up = level.scr_anim["napalm"]["explode"];
time = getanimlength(explode_wind_up);
self animscripted("napalm_explode", self.origin, self.angles, explode_wind_up, "normal");
wait time/2.0;

self DoDamage( self.health + 666, self.origin, self );

return;
        }
wait .5;
}
wait_network_frame();
}
}

napalm_vox()
{
self endon( "death" );

wait( 4 );

napalm_wait = 4;

while(1)
{
players = getplayers();

for(i=0;i<players.size;i++)
{
if(DistanceSquared(self.origin, players[i].origin) > 1200 * 1200)
{
sound_amb = "zmb_napalm_ambient0" + randomint(2);
self playsound( sound_amb );
napalm_wait = 7;
}
else if(DistanceSquared(self.origin, players[i].origin) > 200 * 200)
{
sound_attack = "zmb_napalm_attack0" + randomint(2);
self playsound( sound_attack );
napalm_wait = 5;
}
else if(DistanceSquared(self.origin, players[i].origin) < 150 * 150)
wait(.05);
}
wait randomfloatrange( 1, napalm_wait );
}
}

napalm_trail()
{
self endon( "death" );

self thread trail1();
//self thread trail2();
}

trail1()
{
while( isDefined( self ) )
{
PlayFxOnTag( level._effect["character_fire_death_torso"], self, "J_SpineLower" );
wait 4;
}
}

trail2()
{
while( isDefined( self ) )
{
PlayFxOnTag( level._effect[ "napalm_fire_foot" ], self, "tag_origin" );
      wait .5;
}
}

napalm_vision()
{
    while( isDefined( self ) )
    {
players = get_players();

for(i = 0; i < players.size; i++)
{
if ( !isdefined( self ) )
break;

if( distance(players[i] getOrigin(), self getOrigin()) <= level.zombie_vars["napalm_vision_radius"] && !players[i] maps\_laststand::player_is_in_laststand() )
{
players[i] setBurn( 0.5 );
wait .05;
}
else
players[i] setBurn( 0 );
//players[i] setClientDvar("r_flamefx_enable", 0);
wait .05;
}

wait_network_frame();
}
thread players_disableflamescreen();
}

napalm_death_explo()
{
playsoundatposition( "zmb_napalm_explode", self.origin );
PlayFx(level._effect["napalm_explo"], self getTagOrigin("J_MainRoot"));

players = get_players();
dist = level.zombie_vars["napalm_explo_radius_plr"];

for(i = 0; i < players.size; i++)
{
players[i] setClientDvar("r_flamefx_enable", 0);

if( Distance( self.origin, players[i].origin ) <= ( dist + 20 ))
self thread napalm_damage(dist + 20, (240 + randomint(15)), players[i], 3.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 70) )
self thread napalm_damage(dist + 70, 120, players[i], 2.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 120))
self thread napalm_damage(dist + 120, 70, players[i], 1.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 170))
self thread napalm_damage(dist + 170, 30, players[i], .5);

wait .2;
}
}

napalm_damage(rango, da, player, t)
{
if( !self HasPerk("specialty_detectexplosive") )
{
self RadiusDamage( self.origin, rango, da, da, self, "MOD_EXPLOSIVE" );
player ShellShock( "explosion", t );
}
}

napalm_area_effect( origin, fx )
{
effectArea = spawn( "trigger_radius", origin, 0, level.zombie_vars["napalm_trap_radius"], 100 );

PlayFX( level._effect[ fx ], origin );

trap_time = 0;
   
while( trap_time <= level.zombie_vars["trap_time"] )
{
players = get_players();
zombies = GetAIArray( "axis" );

for(i = 0; i < players.size; i++)
{
if( players[i] IsTouching( effectArea ) && !players[i] HasPerk("specialty_detectexplosive") && !players[i] maps\_laststand::player_is_in_laststand() )
players[i] DoDamage( level.zombie_vars["napalm_trap_damage"], players[i].origin );
}

for(j = 0; j < zombies.size; j++)
{
if( !zombies[j] IsTouching( effectArea ) )
continue;

if( (Isdefined(zombies[j].is_napalm) && zombies[j].is_napalm == true) || Isdefined(zombies[j].animname) && (zombies[j].animname == "engineer_zombie" || zombies[j].animname == "ape_zombie" ) )
continue;

if ( is_magic_bullet_shield_enabled( zombies[j] ) )
continue;

if( zombies[j].animname == "zombie" && !zombies[j].zmb_fire_anim && zombies[j].has_legs == true )
{
zombies[j].zmb_fire_anim = true;

zombies[j].deathanim = random( level._zombie_napalm_fire_death[zombies[j].animname] );
zombies[j] thread animscripts\death::flame_death_fx();
wait 0.2;
zombies[j] DoDamage( zombies[j].health + 666, zombies[j].origin );
}
else
{
zombies[j] thread animscripts\death::flame_death_fx();

wait (randomfloatrange(0.1, 2.5));
zombies[j] DoDamage( zombies[j].health + 666, zombies[j].origin );
}
}

wait(1);
trap_time = trap_time + 1;
}

effectArea Delete();
}

napalm_death()
{
self waittill( "death" );

if( isdefined(self.shrinkray_napalm) && self.shrinkray_napalm == true )
{
self thread napalm_death_explo();
level thread napalm_area_effect( self.origin, "napalm_fire_trap" );

//level thread napalm_plr_sound("kill");

self delete();
}

level.zombie_vars["napalm_alive"] = false;

level waittill("between_round_over");
level.zombie_vars["napalm_alive"] = false;
}

napalm_plr_sound( type )
{
players = get_players();

for(i = 0; i < players.size; i++)
players[i] thread napalm_plr_sound_opc( type );
}

napalm_plr_sound_opc(opc)
{
self endon( "disconnect" );

index = maps\_zombiemode_weapons::get_player_index( self );
plr = "plr_" + index + "_";
if(opc == "spawn")
self thread play_napalm_dialog_spawn(plr);
else
self thread play_napalm_dialog_kill(plr);
wait(3.5);
//self thread play_tesla_sound("tesla_happy"); (moved to client)
level clientNotify ("TGH");
}

play_napalm_dialog_spawn(player_index)
{
waittime = 0.25;
if(!IsDefined (self.vox_spawn_napalm))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_spawn_napalm");
//iprintlnbold(num_variants);
self.vox_spawn_napalm = [];
for(i=0;i<num_variants;i++)
{
self.vox_spawn_napalm[self.vox_spawn_napalm.size] = "vox_spawn_napalm_" + i;
//iprintlnbold("vox_spawn_napalm_" + i);
}
self.vox_spawn_napalm_available = self.vox_spawn_napalm;
}

if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}

sound_to_play = random(self.vox_spawn_napalm_available);
//iprintlnbold("LINE:" + player_index + sound_to_play);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_spawn_napalm_available = array_remove(self.vox_spawn_napalm_available,sound_to_play);

if (self.vox_spawn_napalm_available.size < 1 )
{
self.vox_spawn_napalm_available = self.vox_spawn_napalm;
}
}

play_napalm_dialog_kill(player_index)
{
waittime = 0.25;
if(!IsDefined (self.vox_kill_napalm))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_kill_napalm");
//iprintlnbold(num_variants);
self.vox_kill_napalm = [];
for(i=0;i<num_variants;i++)
{
self.vox_kill_napalm[self.vox_kill_napalm.size] = "vox_kill_napalm_" + i;
//iprintlnbold("vox_kill_napalm_" + i);
}
self.vox_kill_napalm_available = self.vox_kill_napalm;
}

if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}

sound_to_play = random(self.vox_kill_napalm_available);
//iprintlnbold("LINE:" + player_index + sound_to_play);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_kill_napalm_available = array_remove(self.vox_kill_napalm_available,sound_to_play);

if (self.vox_kill_napalm_available.size < 1 )
{
self.vox_kill_napalm_available = self.vox_kill_napalm;
}
}

players_disableflamescreen()
{
wait 1.1;
players = getPlayers();
for(i=0;i<players.size;i++)
players[i] setClientDvar("r_flamefx_enable", 0);
}
[/noae]
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 2 days ago
Posts
339
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
gympie6's Contact & Social LinksDistenc5Teffrie
Hi! I'm recently added the napalm zombie created by shippuden1592, but the napalm zombie spawns and walks towards me for a couple of seconds before exploding. I have set everything correctly but nothing seemed to work. If anyone who used his napalm zombie, got it to work or have answers as any help is appreciated!

My _zombiemode_ai_napalm (I added a info_volume like he instructed with the script_noteworthy of zone_1, but i use triggers for my zones instead of info_volume so i'm wondering if it had something to do with that as well. the player_zone line "napalm = Getentarray( "player_zone", "script_noteworthy" );" is changed to zone_1 as well. I also put the napalm in my second zone(zone_1 is my second zone) instead of the start_zone, so any context i could give to solve this.

[noae][noae][noae]
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include animscripts\Utility;

#using_animtree( "generic_human" );

init()
{
//level.scr_anim["napalm"]["walk"] = %Ai_walk_weary_a; //Animacion parecida al napalm ( cambiar si les gusta mejor )
level.scr_anim["napalm"]["walk"] = %ai_zombie_napalm_run; //Animacion oficial napalm ( cambiar si les gusta mejor )
level.scr_anim["napalm"]["explode"] = %ai_zombie_napalm_attack_01;

level._zombie_napalm_fire_death["zombie"] = [];
level._zombie_napalm_fire_death["zombie"][0] = %ai_flame_death_a;
level._zombie_napalm_fire_death["zombie"][1] = %ai_flame_death_b;
level._zombie_napalm_fire_death["zombie"][2] = %ai_flame_death_c;
level._zombie_napalm_fire_death["zombie"][3] = %ai_flame_death_d;
level._zombie_napalm_fire_death["zombie"][4] = %ai_flame_death_e;
level._zombie_napalm_fire_death["zombie"][5] = %ai_flame_death_f;
level._zombie_napalm_fire_death["zombie"][6] = %ai_flame_death_g;
level._zombie_napalm_fire_death["zombie"][7] = %ai_flame_death_h;

level._effect[ "napalm_spawn" ] = LoadFX( "napalm/napalm_boss_spawn" );
level._effect[ "napalm_fire_trap" ] = LoadFX( "napalm/napalm_fire_trap" );
level._effect[ "napalm_explo" ] = LoadFX( "explosions/default_explosion" );
level._effect[ "napalm_fire_foot" ] = LoadFX( "napalm/napalm_foot" );

set_zombie_var( "napalm_first_round", 10 ); //Ronda a iniciar + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] )
set_zombie_var( "napalm_rnd_max", 3 ); //Numero maximo de ronda entre el proximo spawn
set_zombie_var( "napalm_rnd_min", 5 ); //Numero menor de rondas entre el proximo spawn
set_zombie_var( "napalm_health_multiplier", 50 ); //Incremento de vida
set_zombie_var( "napalm_alive", false ); //Napal vivo/muerto
set_zombie_var( "napalm_explo_radius_plr", 20 ); //Napalm explotara cuando esta cercano al jugador ( a 80 de distancia )
set_zombie_var( "napalm_vision_radius", 1000 ); //Rango de Vision
set_zombie_var( "napalm_trap_damage", 60 ); //Daño trampa a jugador / con PHP no afecta
set_zombie_var( "napalm_trap_radius", 90 ); //Rango de la trampa (esta a corde con el tiempo del fx)
set_zombie_var( "trap_time", 15 ); //Tiempo de la trampa (esta a corde con el tiempo del fx)

precache_models();
thread maps\_zombiemode_ai_napalm::main();
}

precache_models()
{
precachemodel( "bo1_c_viet_zombie_napalm" );
precachemodel( "bo1_c_viet_zombie_napalm_head" );
}

main()
{
flag_wait("all_players_connected");

level thread wait_for_spawn();
level thread spawn_napalm();
}

wait_for_spawn()
{
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] );
// level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;

// iprintlnbold("Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );
while( 1 )
{
if( flag("dog_round" ) )
{
wait(7);
while( level.dog_intermission )
{
wait(0.5);
}
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;
// iprintlnbold("Proxima Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );
}
else
{
if( level.round_number >= level.zombie_vars["napalm_first_round"] )
level.napalm_active_on = true;
else
level.napalm_active_on = undefined;
}

wait(0.5);
}
}

spawn_napalm()
{
napalm_points = GetEntArray( "napalm_spawn", "targetname" );
chosen_spot = undefined;

if( !IsDefined( napalm_points ) || napalm_points.size == 0 )
return;

while( 1 )
{
if( isDefined( level.napalm_active_on ) && level.napalm_active_on == true )
{
if( !level.zombie_vars["napalm_alive"] )
{
wait RandomIntRange(10, 15); //Tiempo de espera en hacer respawn

napalm_points = array_randomize( napalm_points );

for( i = 0; i < napalm_points.size; i++ )
{
_napalm = spawn( "script_model", napalm_points[i].origin );
_napalm SetModel( "tag_origin" );
_napalm linkTo( napalm_points[i] );
_napalm.angles = napalm_points[i].angles;
_napalm.origin = napalm_points[i].origin;

if( zone_active( _napalm ) )
{
chosen_spot = napalm_points[i];
break;
}
wait 0.01;
_napalm delete();
}
level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + RandomIntRange( level.zombie_vars["napalm_rnd_min"], level.zombie_vars["napalm_rnd_max"] );

// level.zombie_vars["napalm_first_round"] = level.zombie_vars["napalm_first_round"] + 1;
// iprintlnbold("Proxima Ronda Spawn ---> " + level.zombie_vars["napalm_first_round"] );

level.zombie_vars["napalm_alive"] = true;
napalm = spawn_zombie( chosen_spot );
napalm thread maps\_zombiemode::round_spawn_failsafe();
napalm thread napalm_prespawn();
}
}
wait(0.5);
}
}

zone_active( np )
{
napalm = Getentarray( "zone_1", "script_noteworthy" ); //Reemplazar por el script_noteworthy de tu info_volume
zone = undefined;
poi = false;

for( i=0; i < napalm.size; i++ )
{
if( np istouching( napalm[i]) )
{
zone = napalm[i].targetname;
if( level.zones[ napalm[i].targetname ].is_enabled )
{
poi = true;
}
}
}
return poi;
}

napalm_prespawn()
{
thread players_disableflamescreen();

self.animname = "zombie";

self maps\_zombiemode_spawner::zombie_spawn_init( true );
self thread maps\_zombiemode_spawner::zombie_think();
        self maps\_zombiemode_spawner::zombie_setup_attack_properties();
        self thread maps\_zombiemode_spawner::find_flesh();

self.gib_override = false;
  self.gibbed = true;
self.no_damage_points = true;
self.ignore_enemy_count = true;
self.is_napalm = true;
self.shrinkray_napalm = true;

self.maxhealth = 100000;
self.health = 100000;
// iprintlnbold("Napalm Vida ---> " + self.health );

/*==== Spawn ====*/
level thread napalm_area_effect( self.origin, "napalm_spawn" );
//level thread napalm_plr_sound( "spawn" );

self playsound("ignite");
self playsound( "evt_napalm_zombie_spawn" );

speed = "run";
spawn_anim = random(level._zombie_rise_anims["zombie"][1][speed]);
time = getanimlength(spawn_anim);
self animscripted("napalm_spawn", self.origin + (0, 0, -45), self.angles, spawn_anim, "normal");
wait( time );
self thread napalm_health();
/*==== End Spawn ====*/

self thread maps\_zombiemode_spawner::zombie_eye_glow_stop();

self thread napalm_walk();
self thread napalm_trail();
self thread napalm_vision();
self thread napalm_vox();
self thread napalm_player();
self thread napalm_death();
}

napalm_health()
{
players = get_players();
  self.maxhealth = level.zombie_health * (players.size * level.zombie_vars["napalm_health_multiplier"] );
  self.health = level.zombie_health * (players.size * level.zombie_vars["napalm_health_multiplier"] );

// iprintlnbold("Napalm Vida ---> " + self.health );
}

napalm_walk()
{
self endon( "death" );

while( isDefined( self ) )
{
walk = true;
zombies = getaiarray( "axis" );
while( zombies.size > 0 )
{
if( zombies.size == 1 || self.health < ( self.maxhealth / 4 ))
{
var = randomintrange(1, 4);
self set_run_anim( "sprint" + var );                       
self.run_combatanim = level.scr_anim[self.animname]["sprint" + var];
walk = false;
}
wait(0.05);
zombies = getaiarray("axis");
if( isDefined( walk ) )
{
self set_run_anim( "walk" + 2);                       
self.run_combatanim = level.scr_anim["napalm"]["walk"];
}
}

wait_network_frame();
}
}

napalm_player()
{
self endon( "death" );

while(1)
{
players = getplayers();

for(i=0;i<players.size;i++)
{
if( self.shrinkray_napalm == true && Distance( self.origin, players[i].origin ) <= level.zombie_vars["napalm_explo_radius_plr"])
        {
self playsound( "evt_napalm_zombie_charge" );

//explode_wind_up = %ai_zombie_taunts_5f;
explode_wind_up = level.scr_anim["napalm"]["explode"];
time = getanimlength(explode_wind_up);
self animscripted("napalm_explode", self.origin, self.angles, explode_wind_up, "normal");
wait time/2.0;

self DoDamage( self.health + 666, self.origin, self );

return;
        }
wait .5;
}
wait_network_frame();
}
}

napalm_vox()
{
self endon( "death" );

wait( 4 );

napalm_wait = 4;

while(1)
{
players = getplayers();

for(i=0;i<players.size;i++)
{
if(DistanceSquared(self.origin, players[i].origin) > 1200 * 1200)
{
sound_amb = "zmb_napalm_ambient0" + randomint(2);
self playsound( sound_amb );
napalm_wait = 7;
}
else if(DistanceSquared(self.origin, players[i].origin) > 200 * 200)
{
sound_attack = "zmb_napalm_attack0" + randomint(2);
self playsound( sound_attack );
napalm_wait = 5;
}
else if(DistanceSquared(self.origin, players[i].origin) < 150 * 150)
wait(.05);
}
wait randomfloatrange( 1, napalm_wait );
}
}

napalm_trail()
{
self endon( "death" );

self thread trail1();
//self thread trail2();
}

trail1()
{
while( isDefined( self ) )
{
PlayFxOnTag( level._effect["character_fire_death_torso"], self, "J_SpineLower" );
wait 4;
}
}

trail2()
{
while( isDefined( self ) )
{
PlayFxOnTag( level._effect[ "napalm_fire_foot" ], self, "tag_origin" );
      wait .5;
}
}

napalm_vision()
{
    while( isDefined( self ) )
    {
players = get_players();

for(i = 0; i < players.size; i++)
{
if ( !isdefined( self ) )
break;

if( distance(players[i] getOrigin(), self getOrigin()) <= level.zombie_vars["napalm_vision_radius"] && !players[i] maps\_laststand::player_is_in_laststand() )
{
players[i] setBurn( 0.5 );
wait .05;
}
else
players[i] setBurn( 0 );
//players[i] setClientDvar("r_flamefx_enable", 0);
wait .05;
}

wait_network_frame();
}
thread players_disableflamescreen();
}

napalm_death_explo()
{
playsoundatposition( "zmb_napalm_explode", self.origin );
PlayFx(level._effect["napalm_explo"], self getTagOrigin("J_MainRoot"));

players = get_players();
dist = level.zombie_vars["napalm_explo_radius_plr"];

for(i = 0; i < players.size; i++)
{
players[i] setClientDvar("r_flamefx_enable", 0);

if( Distance( self.origin, players[i].origin ) <= ( dist + 20 ))
self thread napalm_damage(dist + 20, (240 + randomint(15)), players[i], 3.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 70) )
self thread napalm_damage(dist + 70, 120, players[i], 2.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 120))
self thread napalm_damage(dist + 120, 70, players[i], 1.5);

if( Distance( self.origin, players[i].origin ) > dist && Distance( self.origin, players[i].origin ) <= (dist + 170))
self thread napalm_damage(dist + 170, 30, players[i], .5);

wait .2;
}
}

napalm_damage(rango, da, player, t)
{
if( !self HasPerk("specialty_detectexplosive") )
{
self RadiusDamage( self.origin, rango, da, da, self, "MOD_EXPLOSIVE" );
player ShellShock( "explosion", t );
}
}

napalm_area_effect( origin, fx )
{
effectArea = spawn( "trigger_radius", origin, 0, level.zombie_vars["napalm_trap_radius"], 100 );

PlayFX( level._effect[ fx ], origin );

trap_time = 0;
   
while( trap_time <= level.zombie_vars["trap_time"] )
{
players = get_players();
zombies = GetAIArray( "axis" );

for(i = 0; i < players.size; i++)
{
if( players[i] IsTouching( effectArea ) && !players[i] HasPerk("specialty_detectexplosive") && !players[i] maps\_laststand::player_is_in_laststand() )
players[i] DoDamage( level.zombie_vars["napalm_trap_damage"], players[i].origin );
}

for(j = 0; j < zombies.size; j++)
{
if( !zombies[j] IsTouching( effectArea ) )
continue;

if( (Isdefined(zombies[j].is_napalm) && zombies[j].is_napalm == true) || Isdefined(zombies[j].animname) && (zombies[j].animname == "engineer_zombie" || zombies[j].animname == "ape_zombie" ) )
continue;

if ( is_magic_bullet_shield_enabled( zombies[j] ) )
continue;

if( zombies[j].animname == "zombie" && !zombies[j].zmb_fire_anim && zombies[j].has_legs == true )
{
zombies[j].zmb_fire_anim = true;

zombies[j].deathanim = random( level._zombie_napalm_fire_death[zombies[j].animname] );
zombies[j] thread animscripts\death::flame_death_fx();
wait 0.2;
zombies[j] DoDamage( zombies[j].health + 666, zombies[j].origin );
}
else
{
zombies[j] thread animscripts\death::flame_death_fx();

wait (randomfloatrange(0.1, 2.5));
zombies[j] DoDamage( zombies[j].health + 666, zombies[j].origin );
}
}

wait(1);
trap_time = trap_time + 1;
}

effectArea Delete();
}

napalm_death()
{
self waittill( "death" );

if( isdefined(self.shrinkray_napalm) && self.shrinkray_napalm == true )
{
self thread napalm_death_explo();
level thread napalm_area_effect( self.origin, "napalm_fire_trap" );

//level thread napalm_plr_sound("kill");

self delete();
}

level.zombie_vars["napalm_alive"] = false;

level waittill("between_round_over");
level.zombie_vars["napalm_alive"] = false;
}

napalm_plr_sound( type )
{
players = get_players();

for(i = 0; i < players.size; i++)
players[i] thread napalm_plr_sound_opc( type );
}

napalm_plr_sound_opc(opc)
{
self endon( "disconnect" );

index = maps\_zombiemode_weapons::get_player_index( self );
plr = "plr_" + index + "_";
if(opc == "spawn")
self thread play_napalm_dialog_spawn(plr);
else
self thread play_napalm_dialog_kill(plr);
wait(3.5);
//self thread play_tesla_sound("tesla_happy"); (moved to client)
level clientNotify ("TGH");
}

play_napalm_dialog_spawn(player_index)
{
waittime = 0.25;
if(!IsDefined (self.vox_spawn_napalm))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_spawn_napalm");
//iprintlnbold(num_variants);
self.vox_spawn_napalm = [];
for(i=0;i<num_variants;i++)
{
self.vox_spawn_napalm[self.vox_spawn_napalm.size] = "vox_spawn_napalm_" + i;
//iprintlnbold("vox_spawn_napalm_" + i);
}
self.vox_spawn_napalm_available = self.vox_spawn_napalm;
}

if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}

sound_to_play = random(self.vox_spawn_napalm_available);
//iprintlnbold("LINE:" + player_index + sound_to_play);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_spawn_napalm_available = array_remove(self.vox_spawn_napalm_available,sound_to_play);

if (self.vox_spawn_napalm_available.size < 1 )
{
self.vox_spawn_napalm_available = self.vox_spawn_napalm;
}
}

play_napalm_dialog_kill(player_index)
{
waittime = 0.25;
if(!IsDefined (self.vox_kill_napalm))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_kill_napalm");
//iprintlnbold(num_variants);
self.vox_kill_napalm = [];
for(i=0;i<num_variants;i++)
{
self.vox_kill_napalm[self.vox_kill_napalm.size] = "vox_kill_napalm_" + i;
//iprintlnbold("vox_kill_napalm_" + i);
}
self.vox_kill_napalm_available = self.vox_kill_napalm;
}

if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}

sound_to_play = random(self.vox_kill_napalm_available);
//iprintlnbold("LINE:" + player_index + sound_to_play);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_kill_napalm_available = array_remove(self.vox_kill_napalm_available,sound_to_play);

if (self.vox_kill_napalm_available.size < 1 )
{
self.vox_kill_napalm_available = self.vox_kill_napalm;
}
}

players_disableflamescreen()
{
wait 1.1;
players = getPlayers();
for(i=0;i<players.size;i++)
players[i] setClientDvar("r_flamefx_enable", 0);
}
[/noae][/noae][/noae]

I think what I know what you mean but the problem is that these zombies can only spawn from ground spawners.
they get stuck or explode out of nowhere when they have to go through windows.

I couldn't find a solution to the problem, maybe Shippuden knows how to fix this.
Last Edit: September 08, 2018, 04:00:35 pm by gympie6
broken avatar :(
×
broken avatar :(
Location: vn
Date Registered: 23 February 2015
Last active: 71 days ago
Posts
208
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Personal Quote
bịnh thần kinh
×
Joeycx's Groups
Joeycx's Contact & Social Links
I think what I know what you mean but the problem is that these zombies can only spawn from ground spawners.
they get stuck or explode out of nowhere when they have to go through windows.

I couldn't find a solution to the problem, maybe Shippuden knows how to fix this.

Thanks for the helpful input. Shippuden doesn't answer my replies and i'm still wondering if anyone got this to work correctly.

 

Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Twitch
Loading ...