UGX-Mods

Call of Duty 5: World at War => Tutorial Desk => Scripting => Topic started by: gympie6 on August 02, 2021, 01:51:57 pm

Title: Zombie Boss: Fire Zombie (Level: Easy)
Post by: gympie6 on August 02, 2021, 01:51:57 pm
(https://steamuserimages-a.akamaihd.net/ugc/1706287071953252722/DC38E7C97E7670851B2F30925E63A4DF464BAF2C/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false)

This is an alternative version of the electricity zombie.
These kind of zombies also set your screen on fire 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:
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

#using_animtree( "generic_human" );
spawn_burnzombie()
{        
    // Settings
    self.pathEnemyFightDist = 72;
    self.meleeAttackDist = 72;
    self.fire_range = 75;
    self.fire_duration = 0.75; // in seconds
    self.maxhealth = int(level.zombie_health * 1.5);
   
    self.health = self.maxhealth;
   
    self detachAll();
    self.headModel = "char_ger_honorgd_zomb_behead";
    self attach(self.headModel);
   
    self thread burn_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.fire_range)
                {
                    self.favoriteenemy SetBurn( self.fire_duration );
                    self.favoriteenemy shellshock( "pain", self.fire_duration );
                    self.favoriteenemy playsound( "small_fire" );
                }
            }
        }        
    }
}

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

    while(1)
    {
        PlayFxOnTag( level._effect["character_fire_death_sm"], self, "j_thumb_le_1" );
        PlayFxOnTag( level._effect["character_fire_death_sm"], self, "j_thumb_ri_1" );
        PlayFxOnTag( level._effect["character_fire_death_sm"], self, "j_head" );
        wait 12;
    }
}
(You can for example copy the _zombiemode.gsc file, clear that file and paste this in)
________________________________________________
3. openup _zombiemode_spawner and look for:
Code Snippet
Plaintext
self notify( "zombie_init_done" );
change it to this:
Code Snippet
Plaintext
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 burn zombie will spawn
    spawn_percentage = 10; // the spawn percentage the burn zombie will spawn

    if (level.round_number >= spawn_round && randomInt(100) <= spawn_percentage)
    {
        self thread maps\YOURSCRIPT::spawn_burnzombie();
    }
}
________________________________________________
4. Build mod and you're done! Have fun! :)
You don't need to add any fx because I am re-using the flamethrower fx.
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: Crepp115 on August 26, 2021, 05:12:40 pm
but I name the script that when doing it it does not link it or it does not find the script

The same thing happens to me with the electric zombie
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: gympie6 on August 26, 2021, 07:14:02 pm
but I name the script that when doing it it does not link it or it does not find the script

The same thing happens to me with the electric zombie
No idea what you mean with that. Look at the screenshots, maybe you have missed a step?
If you still have troubles please contact me at discord UGX modding help and I will help you.

(https://i.gyazo.com/d11ca33f16c9da9fd91fbfe4a08b161b.png)

(https://i.gyazo.com/a8da6ab4e7cadb36e8a316aff1ed216f.png)
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: Crepp115 on August 26, 2021, 09:47:33 pm
No idea what you mean with that. Look at the screenshots, maybe you have missed a step?
If you still have troubles please contact me at discord UGX modding help and I will help you.

(https://i.gyazo.com/d11ca33f16c9da9fd91fbfe4a08b161b.png)

(https://i.gyazo.com/a8da6ab4e7cadb36e8a316aff1ed216f.png)
thank you I need to put the name of my new script
sorry for the inconvenience :))
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: gympie6 on August 27, 2021, 07:00:20 am
It's is no problem! :), Maybe I wasn't clear about that. I am glad you got it working!
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: Crepp115 on August 28, 2021, 01:23:03 am
It's is no problem! :), Maybe I wasn't clear about that. I am glad you got it working!
I have a problem using the ccm apoticon servent when shooting and uploading the burned zombie gives me this error

(https://i.servimg.com/u/f49/20/34/04/55/error10.png)

It only happens to me with the fire and electric zombie
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: gympie6 on August 28, 2021, 09:23:29 am
I am afraid I have no clue why that happends.:(
It sounds like the gear added to them are crashing your game.
You can try to // it and see if that helps.
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: ghetto_wizzz on May 08, 2022, 05:06:32 pm
Hey I was wondering (for your electric and fire bosses) what effects do I need to have in my zone_source file/csv? I have either seemed to note it out or it is just completely missing from my files, seeing that they appear to not be in flames or electrocution state :) Thanks
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: gympie6 on May 09, 2022, 07:50:22 pm
Hey I was wondering (for your electric and fire bosses) what effects do I need to have in my zone_source file/csv? I have either seemed to note it out or it is just completely missing from my files, seeing that they appear to not be in flames or electrocution state :) Thanks
add these to your zone_source/MODNAME.csv or your modbuilder.
 
electric zombie:
fx,env/electrical/fx_elec_player_sm
 
fire zombie:
fx,env/fire/fx_fire_player_md
 
Title: Re: Zombie Boss: Fire Zombie (Level: Easy)
Post by: ghetto_wizzz on May 12, 2022, 11:35:58 pm
you're the best gympie!!