UGX-Mods 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 Facebook
Sign In with Twitch

Zombie Boss: Electricity zombie (Level: Easy)

broken avatar :(
Created 1 year ago
by gympie6
0 Members and 1 Guest are viewing this topic.
444 views
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 9 days ago
Posts
575
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
No code is bug free
Signature
My published cod maps:

Subzero
Djinncaves
Enclosed (a.k.a baconcube)
Bayern
Snowblind
Furtrelock

Black Ops Perks: https://www.ugx-mods.com/forum/scripts/55/call-of-duty-world-at-war-black-ops-perks/22180/
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.


I made this mini boss a few years back for the map called: Bayern
These kind of zombies also electrify you after you got hit by them.
Not much special but it creates a bit uniqueness to your map

________________________________________________


1. copy the following files from raw/maps folder into your mod:
_zombiemode
_zombiemode_spawner
(If you already have those files you don't need to copy them)

________________________________________________


2. In your mod make a new script file (MODNAME/maps) and paste the following code in there:
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

#using_animtree( "generic_human" );
spawn_electricityzombie()
{        
    // Settings
    self.pathEnemyFightDist = 72;
    self.meleeAttackDist = 72;
    self.electricity_range = 75;
    self.electrified_duration = 0.75; // in seconds
    self.maxhealth = int(level.zombie_health * 1.5);
   
    self.health = self.maxhealth;
   
    if (randomInt(100) <= 85)
    {
        self.hatModel = "char_ger_honorgd_headgear3";
        self attach(self.hatModel);
    }
    if (randomInt(100) <= 75)
    {
        self.hatModel2 = "char_ger_hnrgd_player_shades";
        self attach(self.hatModel2);
    }
   
    self thread electricity_zombie_fx();
   
    while ( 1 )
    {
        self waittill( "meleeanim", note );
        if ( note == "fire" )
        {
            if( IsDefined( self.favoriteenemy ) )
            {
                if (!self.favoriteenemy maps\_laststand::player_is_in_laststand() && distance( self.favoriteenemy.origin, self.origin ) < self.electricity_range)
                {
                    self.favoriteenemy setelectrified( self.electrified_duration );
                    self.favoriteenemy shellshock( "electrocution", self.electrified_duration );
                    self.favoriteenemy playsound( "tesla_bounce" );
                }
            }
        }        
    }
}

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

    while(1)
    {
        PlayFxOnTag( level._effect["elec_sm"], self, "j_thumb_le_1" );
        PlayFxOnTag( level._effect["elec_sm"], self, "j_thumb_ri_1" );
        wait 6;
    }
}
(You can for example copy the _zombiemode.gsc file, clear that file and paste this in)
3. openup _zombiemode and look for:
precache_models()
{
    precachemodel( "char_ger_honorgd_zomb_behead" );
    precachemodel( "char_ger_zombieeye" );
    PrecacheModel( "tag_origin" );
}
change it to this:
precache_models()
{
    precachemodel( "char_ger_honorgd_zomb_behead" );
    precachemodel( "char_ger_zombieeye" );
    PrecacheModel( "tag_origin" );

    precachemodel( "char_ger_honorgd_headgear3" );
    precachemodel( "char_ger_hnrgd_player_shades" );
}
________________________________________________
4. openup _zombiemode_spawner and look for:
self notify( "zombie_init_done" );
change it to this:
self notify( "zombie_init_done" );

if (self.animname != "quad_zombie" && self.animname != "boss_zombie" && self.animname != "zombie_dog")
{
    spawn_round = 3; // the starting round the electricity zombie will spawn
    spawn_percentage = 10; // the spawn percentage the electricity zombie will spawn

    if (level.round_number >= spawn_round && randomInt(100) <= spawn_percentage)
    {
        self thread maps\YOURSCRIPT::spawn_electricityzombie();
    }
}
________________________________________________
5. Add this to your modbuilder:
// Electricity zombie
xmodel,char_ger_hnrgd_player_shades
xmodel,char_ger_honorgd_headgear3
// Electricity zombie
________________________________________________
6. Build mod and you're done! Have fun! :)
You don't need to add any fx because I am re-using the dlc3 fx.
Last Edit: August 26, 2021, 07:08:41 pm by gympie6

 
Loading ...