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

Instakill perma-perk (like in BO2)

broken avatar :(
Created 8 years ago
by Soy-Yo
0 Members and 1 Guest are viewing this topic.
4,913 views
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Well, basically yesterday I was bored and decided to make it. It is that red skull that appeared during instakill to a player who hadn't killed any zombie in the previous two instakills.

http://youtu.be/bQOZWvuxqh8

So let's start:
1. Copy your _zombiemode_powerups.gsc and _zombiemode.gsc from root/raw/maps to root/mods/MAPNAME/maps if you don't have them already.

2. Open _zombiemode_powerups.gsc. At the beginning of the file you might see this:
Code Snippet
Plaintext
PrecacheShader( "specialty_doublepoints_zombies" );
PrecacheShader( "specialty_instakill_zombies" );
So add this under:
Code Snippet
Plaintext
// Soy-yo's perma-insta-kill
PrecacheShader( "specialty_perma_instakill_zombies" );
Now find this function:
Code Snippet
Plaintext
insta_kill_powerup( drop_item )
Inside it, just below
Code Snippet
Plaintext
level notify( "powerup instakill" );
level endon( "powerup instakill" );
add this:
Code Snippet
Plaintext
// Soy-yo's perma-insta-kill
players = get_players();
for( i = 0; i < players.size; i++ ) {
    if( isAlive( players[i] ) )
        players[i].initialKills = players[i].kills;
    if( isDefined( players[i].zeroInstaKills ) && ( players[i].zeroInstaKills >= 2
        || ( players[i].zeroInstaKills == 1 && randomInt(100) == 0 ) )
        && isAlive( players[i] ) )
            players[i] thread soy_yos_insta_kill_perma_perk_init();
}
And under this (inside the for loop):
Code Snippet
Plaintext
players[i] notify("insta_kill_over");
add this:
Code Snippet
Plaintext
// Soy-yo's perma-insta-kill
if( isDefined( players[i].initialKills ) && isAlive( players[i] ) && players[i].kills == players[i].initialKills ) { // the player hasn't killed anybody this time
    if( !isDefined( players[i].zeroInstaKills ) )
        players[i].zeroInstaKills = 1;
    else players[i].zeroInstaKills++;
} else if( isDefined( players[i].zeroInstaKills ) )
    players[i].zeroInstaKills = undefined;
Then, just after this function ends, add these functions:
Code Snippet
Plaintext
soy_yos_insta_kill_perma_perk_init() {
   
    self endon( "death" );
    self endon( "disconnect" );
   
    self.ignoreme = true;
    self thread soy_yos_perma_insta_kill_hud();
    self thread soy_yos_insta_kill_perma_perk_main();
    wait(15);
    self notify( "insta_kill_perma_perk_out" );
    self.ignoreme = false;
   
}

soy_yos_perma_insta_kill_hud() {
    hud = create_simple_hud( self );
    hud.foreground = true;   
    hud.sort = 2;
    hud.hidewheninmenu = false;
    hud.alignX = "center";
    hud.alignY = "bottom";
    hud.horzAlign = "center";
    hud.vertAlign = "bottom";
    hud.y = hud.y - 80;
    hud.alpha = 1;
    hud setShader( "specialty_perma_instakill_zombies", 24, 24 );
    hud thread soy_yos_perma_insta_kill_hud_overlay();
    self waittill_any( "insta_kill_perma_perk_out","death","disconnect" );
    hud destroy_hud();
    hud notify( "hud_destroyed" );
}

soy_yos_perma_insta_kill_hud_overlay() {
   
    self endon( "hud_destroyed" );
   
    wait(10);
   
    for( i = 0; i < 5; i++ ) {
        self.alpha = 0;
        wait(.25);
        self.alpha = 1;
        wait(.25);
    }
   
    while(1) {
        self.alpha = 0;
        wait(.1);
        self.alpha = 1;
        wait(.1);
    }
}

soy_yos_insta_kill_perma_perk_main() {
   
    self endon( "insta_kill_perma_perk_out" );
    self endon( "death" );
    self endon( "disconnect" );
   
    while(1) {
        zombies = getAIArray( "axis" );
        for( i = 0; i < zombies.size; i++ ) {
            if( isAlive( self ) && !( self maps\_laststand::player_is_in_laststand() ) && distance( zombies[i].origin, self.origin ) < 30 ) {
                zombies[i] doDamage( zombies[i].health + 935, zombies[i].origin );
                zombies[i] maps\_zombiemode_spawner::zombie_head_gib();
                self maps\_zombiemode_score::add_to_player_score(50);
                wait(.3); // don't kill zombies too fast
            }
        }
        wait(.1);
    }
}
3. Now open _zombiemode.gsc and find this (it's inside "player_damage_override( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, modelIndex, psOffsetTime )" function):
Code Snippet
Plaintext
if( isDefined( eAttacker.is_zombie ) && eAttacker.is_zombie )
{
and add this just below:
Code Snippet
Plaintext
// Soy-yo's instakill perma-perk
if( level.zombie_vars["zombie_insta_kill"] == 1 && isDefined( self.zeroInstaKills ) && self.zeroInstaKills >= 2 )
    self.zeroInstaKills = undefined;
4. Create your own shader or use mine:
MEGA
Mediafire
Extract the files, navigate to instakill_permaperk_shader/mods and rename "MAPNAME" to your map's name. Move everything into WaW root.
Then, include it in your mod.csv,
Code Snippet
Plaintext
// Edited For Perma Instakill
material,specialty_perma_instakill_zombies
tick it in IWD File List and build FF and IWD.

I think that's all. I haven't tested it in co-op, but there it shouldn't be any problem. Let me know if you find any bug, give credit to me if you use it in your map and have fun. :)
Last Edit: November 05, 2015, 08:23:19 pm by Soy-Yo
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
That's pretty cool, but why didn't you put this in the tutorials section?

For the shader, make sure you convert the image with the 'blend' option instead of 'replace'.
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
That's pretty cool, but why didn't you put this in the tutorials section?

It is in tutorials-section, but I see what you mean. 2 same kind of sections can be confusing at time
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
That's pretty cool, but why didn't you put this in the tutorials section?

For the shader, make sure you convert the image with the 'blend' option instead of 'replace'.
Don't you mean the downloadable items for mappers lol?
It's here mainly because I didn't add that stupid green fx and the shader didn't look well. But if you think this shouldn't be here, please, some mod, move it.

And thanks. Now the shader has transparency. :D
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
Forum Rank
Immortal
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
If you want scripts / features made for you, then contact me by PM or email / skype etc
it will cost you tho so if you have no intention of reciprocating don't even waste my time ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social Links[email protected]HarryBo21HarryBo000
Don't you mean the downloadable items for mappers lol?
It's here mainly because I didn't add that stupid green fx and the shader didn't look well. But if you think this shouldn't be here, please, some mod, move it.

And thanks. Now the shader has transparency. :D
was just some confusion as there are 3 tutorial boards
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 January 2015
Last active: 7 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Member
Signature
×
liamsa669's Groups
liamsa669's Contact & Social Links
i see nothing that makes this perma :troll: atleast make it set a dvar or table to check

 
Loading ...