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: Banzai Zombie (Level: Easy)

broken avatar :(
Created 1 year ago
by gympie6
0 Members and 1 Guest are viewing this topic.
497 views
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 12 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 my big map called: Snowblind
It works fine but they are maybe too focused on their targets even if they are in laststand.
If you are able to fix this issue be my guest and post it here.
I re-checked and fixed some old issues so maybe it's already solved but who knows?

________________________________________________

1. copy the following files from raw/maps folder to your mod:
  • _zombiemode
  • _zombiemode_spawner
  • dlc3_code
(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_banzaizombie()
{    
    self.gib_override = false;
    self.gibbed = true;
   
    self setModel("char_ger_ansel_body");
   
    self.hatmodel = "char_ger_wermachtwet_helm1";
    self Attach( self.hatmodel );

    // Wait until the zombie entered the player area
    while(1)
    {
        if (!self.ignoreall)
        {
            self thread banzai_zombie();
            break;
        }
        wait 0.5;
    }
}

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

    // Settings
    self.moveplaybackrate = 0.80; // Play banzai animation at 80%
    self.banzai_minimum_damage = 65; // Melee minimum damage with bayonet
    self.banzai_maximum_damage = 75; // Melee maximum damage with bayonet
    self.banzai_range = 70; // Melee range with bayonet
    self.banzai_hit_range = 30; // Melee hit range with bayonet
    // Settings
   
    self.pathEnemyFightDist = 0.0000001; // To Disable hand melee attacks.
    self.banzai_stop_stabbing = false;
    self thread banzai_zombie_stop_stabbing();
    self thread banzai_zombie_draw_weapon();
   
    self.zombie_move_speed = "sprint";
    banzaiRandom = randomFloat(100);
    if (banzaiRandom <= 25) self.run_combatanim = %ai_bonzai_sprint_a;
    else if (banzaiRandom > 25 && banzaiRandom <= 50) self.run_combatanim = %ai_bonzai_sprint_b;
    else if (banzaiRandom > 50 && banzaiRandom <= 75) self.run_combatanim = %ai_bonzai_sprint_c;
    else self.run_combatanim = %ai_bonzai_sprint_d;
   
    players = get_players();
   
    while( 1 )
    {
        if (isdefined(self.favoriteenemy))
        {
            target = self.favoriteenemy;
            if (self.banzai_stop_stabbing)
            {
                return;
            }
           
            if (target.is_zombie || target maps\_laststand::player_is_in_laststand() || target.sessionstate == "spectator" || !isalive(target))
            {
                continue;
            }
           
            if (distance( target.origin, self.origin ) <= self.banzai_range && target.origin != self.origin)
            {        
                self thread banzai_zombie_attack(target, target.origin);
                self waittill( "attack_done" );
            }
        }
        wait .05;
    }
}

banzai_zombie_attack(player, player_pos)
{
    angles = VectorToAngles( player_pos - self.origin );
    self OrientMode( "face angle", angles );
    self animscripted("melee_zombies", self.origin, self.angles, %ai_bayonet_stab_melee);        
   
    while ( 1 )
    {
        self waittill( "melee_zombies", note );
        if ( note == "fire" )
        {
            if( isalive(player) )
            {
                if (distance( player.origin, self.origin ) < self.banzai_range)
                {
                    radiusdamage(player_pos, 45, self.banzai_maximum_damage, self.banzai_minimum_damage, self, "MOD_MELEE");
                   
                    //Give the player the feeling he got stabbed
                    radiusdamage(player_pos, 45, 0, 0, player, "MOD_MELEE");
                    wait .2;
                    self stopAnimScripted();
                    break;
                }
            }
        }
        if ( note == "end" )
            break;        
    }
    self notify( "attack_done" );
}

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

    level waittill( "end_game" );
   
    self.banzai_stop_stabbing = true;
}

banzai_zombie_draw_weapon()
{
    self endon( "death" );
   
    wait 3; // Otherwise you see spooky things
    self.primaryweapon = "kar98k_bayonet";
    self animscripts\shared::placeWeaponOn( self.primaryweapon, "right" );
}
(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_ansel_body" );
    precachemodel( "char_ger_wermachtwet_helm1" );
}
________________________________________________
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 = 6; // the starting round the banzai zombie will spawn
    spawn_percentage = 10; // the spawn percentage the banzai zombie will spawn

    if (level.round_number >= spawn_round && randomInt(100) <= spawn_percentage)
    {
        self thread maps\YOURSCRIPT::spawn_banzaizombie();
    }
}
________________________________________________
5. openup dlc3_code and look for:
include_weapon
along the others add this:
include_weapon( "kar98k_bayonet", false );
________________________________________________
6. Add this to your modbuilder:
// Banzai Zombie
xmodel,char_ger_ansel_body
xmodel,char_ger_wermachtwet_helm1
xanim,ai_bonzai_sprint_a
xanim,ai_bonzai_sprint_b
xanim,ai_bonzai_sprint_c
xanim,ai_bonzai_sprint_d
xanim,ai_bayonet_stab_melee
weapon,sp/kar98k_bayonet
// Banzai Zombie
________________________________________________
7. Build mod and you're done! Have fun! :)
Last Edit: August 26, 2021, 07:09:05 pm by gympie6
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 20 April 2022
Last active: 2 months ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ghetto_wizzz's Groups
ghetto_wizzz's Contact & Social Links
hey, im having a little issue where these guys appear headless lol. other zombies appear too look normal thankfully.
not gonna lie I kinda like the look of them when they have no head, looks rather spooky :o
but say there was a fix lol, it's also worth mentioning i'm also using your electricity zombies, & flame zombies as well! your work is phenomenal so i thought why not have more to cred you for. thanks hope to hear back! :)
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 12 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
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
 
hey, im having a little issue where these guys appear headless lol. other zombies appear too look normal thankfully.
not gonna lie I kinda like the look of them when they have no head, looks rather spooky :o
but say there was a fix lol, it's also worth mentioning i'm also using your electricity zombies, & flame zombies as well! your work is phenomenal so i thought why not have more to cred you for. thanks hope to hear back! :)
 
Can you maybe post a screenshot of what you mean?
I know that the flame guys are headless.
Tbh, I am not sure if all the zombie types can be combined but it's not impossible to fix the issues.
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 20 April 2022
Last active: 2 months ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ghetto_wizzz's Groups
ghetto_wizzz's Contact & Social Links
EDIT: I actually figured out the problem!! I can still send a screen shot if need be, not sure if there is a simple fix too this but this also might help others include a couple of these mini bosses at once.
I realized (shouldn't have taken me this long) But the reason they're headless is because of the fire zombies! I just got hit in game while trying to take a screenie, and I was lit on fire and electrocuted at the same time.. haha so that solves that! But now my question would be, is it possible to call all of these bosses separately? Im assuming this is happening when we call for one of the 3 bosses in "zombiemode_spawner" around where we determine what round and % of chance that they spawn at.
I might be a little off, but it would make total sense to what you last responded with! Thanks :)
    self notify( "zombie_init_done" );

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

    if (level.round_number >= spawn_round && randomInt(100) <= spawn_percentage)
    {
        self thread maps\banzaizombie::spawn_banzaizombie();
        self thread maps\electriczombie::spawn_electricityzombie();
        self thread maps\firezombie::spawn_burnzombie();
    }
}
}

Last Edit: April 30, 2022, 07:00:17 am by ghetto_wizzz
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 12 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
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
EDIT: I actually figured out the problem!! I can still send a screen shot if need be, not sure if there is a simple fix too this but this also might help others include a couple of these mini bosses at once.
I realized (shouldn't have taken me this long) But the reason they're headless is because of the fire zombies! I just got hit in game while trying to take a screenie, and I was lit on fire and electrocuted at the same time.. haha so that solves that! But now my question would be, is it possible to call all of these bosses separately? Im assuming this is happening when we call for one of the 3 bosses in "zombiemode_spawner" around where we determine what round and % of chance that they spawn at.
I might be a little off, but it would make total sense to what you last responded with! Thanks :)
self notify( "zombie_init_done" );

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

    if (level.round_number >= spawn_round && randomInt(100) <= spawn_percentage)
    {
        self thread maps\banzaizombie::spawn_banzaizombie();
        self thread maps\electriczombie::spawn_electricityzombie();
        self thread maps\firezombie::spawn_burnzombie();
    }
}
}
I had a feeling this was happening. :)
Yes you can do it like this:
if (self.animname != "quad_zombie" && self.animname != "boss_zombie" && self.animname != "zombie_dog")
{
    // Banzai zombie will start spawning since round 1 with 25% chance
    if (level.round_number >= 1 && randomInt(100) <= 25)
    {
        self thread maps\banzaizombie::spawn_banzaizombie();
    }
   
    // Electric zombie will start spawning since round 3 with 10% chance
    else if (level.round_number >= 3 && randomInt(100) <= 10)
    {
        self thread maps\electriczombie::spawn_electricityzombie();
    }
   
    // Fire zombie will start spawning since round 5 with 5% chance
    else if (level.round_number >= 5 && randomInt(100) <= 5)
    {
        self thread maps\firezombie::spawn_burnzombie();
    }
}
If you don't like the headless zombies openup: firezombie.gsc
and comment this part like this:
// self detachAll();
// self.headModel = "char_ger_honorgd_zomb_behead";
// self attach(self.headModel);
Let me know if this is what you're looking for. :)
Last Edit: April 30, 2022, 09:23:07 pm by gympie6
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 20 April 2022
Last active: 2 months ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
ghetto_wizzz's Groups
ghetto_wizzz's Contact & Social Links
this fixed the headless glitch and made it super easy for me to adjust the round and % for each one! thank you so much for all your help gympie :) +1
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 20 September 2013
Last active: 12 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
×
gympie6's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
You're welcome!
I am looking forward to play your map with all these bosses in the future. :)

 
Loading ...