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

Perk that increases damage

broken avatar :(
Created 11 years ago
by MJPWGaming
0 Members and 1 Guest are viewing this topic.
2,257 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Alright upon scripting a damage increasing perk how would I script its main function?

I believe it would go in Zombiemode spawner and heres something:

Code Snippet
Plaintext
			if( self hasperk( "specialty_DAMAGEPERKSNAME" ) )
{
damage = damage * 0.5;

But obviously damage isnt defined so Im stuck there.
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
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.
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 LinksHarryBo000[email protected]HarryBo21
i dont think your understanding how to manipulate stuff like this, its not as simple as just defining a variable?

 You need to go edit the damage dealt in the zombiemode_spawner.gsc or thread a function on zombies waiting to catch damage, and deal more if needed

Something ^ like that, not just "have perk so do more", thats fine for stuff that "already exists" in WaW, but not for things that are not

example setting specialty detectexplosive in WaW does nothing, in black ops it automatically sets up the PHD stuff pretty much

You need to think about "what" you want

so

"I want to have a perk that deals damage"

next step

"Where is damag handling dealt"

zombiemode_spawner

"ok where could i catch it"

"zombie_damage() or zombie_damage_ads() functions"

bingo ;)

is there another way i could do this?

well I could have a check on zombies to see when they get damaged and who by? Where would i put that?

"Oh, i can thread it on zombies, so i can literally put it anywhere, just needs to be in a loop, that constantly checks for a zombie spawning, and applies my new thread to it in that case"

^ The above is how i did my proper double tap, its all about working out what is being handled and where
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
i dont think your understanding how to manipulate stuff like this, its not as simple as just defining a variable?

 You need to go edit the damage dealt in the zombiemode_spawner.gsc or thread a function on zombies waiting to catch damage, and deal more if needed

Something ^ like that, not just "have perk so do more", thats fine for stuff that "already exists" in WaW, but not for things that are not

example setting specialty detectexplosive in WaW does nothing, in black ops it automatically sets up the PHD stuff pretty much

You need to think about "what" you want

so

"I want to have a perk that deals damage"

next step

"Where is damag handling dealt"

zombiemode_spawner

"ok where could i catch it"

"zombie_damage() or zombie_damage_ads() functions"

bingo ;)

is there another way i could do this?

well I could have a check on zombies to see when they get damaged and who by? Where would i put that?

"Oh, i can thread it on zombies, so i can literally put it anywhere, just needs to be in a loop, that constantly checks for a zombie spawning, and applies my new thread to it in that case"

^ The above is how i did my proper double tap, its all about working out what is being handled and where

I've been looking threw it for a while now on those threads and it seems those are damage being inflicted by a certain gun.

It sounds like it would be under zombie_damage but I'm not good at scripting.
Last Edit: August 06, 2015, 11:10:58 pm by MJPWGaming
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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 LinksHarryBo000[email protected]HarryBo21
zombie_damage is called "after" the damage is dealt and used to distribute points and other specifics

the damage or damage "mod" used to deal that damage is used and available in that function, cant be more specific as i cant see it

and it has nothing to do with "which gun" hit them. Whe you hit a zombie, zombie.attacker is set to player and zombie.damageWeapon is set to their current weapon

on the next hit, these values are changed again

so you would "catch" the damage here, and deal "additional" damage on top, to give the effect of more power
Last Edit: August 06, 2015, 11:16:33 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
the damage or damage "mod" used to deal that damage is used and available in that function, cant be more specific as i cant see it

Code Snippet
Plaintext
zombie_damage( mod, hit_location, hit_origin, player )
{
if( is_magic_bullet_shield_enabled( self ) )
{
return;
}

//ChrisP - 12/8 - no points for killing gassed zombies!
player.use_weapon_type = mod;
if(isDefined(self.marked_for_death))
{
return;
}

if( !IsDefined( player ) )
{
return;
}
if( IsDefined( player ) && IsPlayer( player ) ) player thread maps\_damagefeedback::updateDamageFeedback( self );

if( self zombie_flame_damage( mod, player ) )
{
if( self zombie_give_flame_damage_points() )
{
player maps\_zombiemode_score::player_add_points( "damage", mod, hit_location, self enemy_is_dog() );
}
}
else if( self maps\_zombiemode_tesla::is_tesla_damage( mod ) )
{
self maps\_zombiemode_tesla::tesla_damage_init( hit_location, hit_origin, player );
return;
}
else
{
player maps\_zombiemode_score::player_add_points( "damage", mod, hit_location, self enemy_is_dog() );
}

if ( mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" )
{
if ( isdefined( player ) && isalive( player ) )
{
self DoDamage( level.round_number + randomintrange( 100, 500 ), self.origin, player);
}
else
{
self DoDamage( level.round_number + randomintrange( 100, 500 ), self.origin, undefined );
}
}
else if( mod == "MOD_PROJECTILE" || mod == "MOD_EXPLOSIVE" || mod == "MOD_PROJECTILE_SPLASH" || mod == "MOD_PROJECTILE_SPLASH")
{
if ( isdefined( player ) && isalive( player ) )
{
self DoDamage( level.round_number * randomintrange( 0, 100 ), self.origin, player);
}
else
{
self DoDamage( level.round_number * randomintrange( 0, 100 ), self.origin, undefined );
}
}
else if( mod == "MOD_ZOMBIE_BETTY" )
{
if ( isdefined( player ) && isalive( player ) )
{
self DoDamage( level.round_number * randomintrange( 100, 200 ), self.origin, player);
}
else
{
self DoDamage( level.round_number * randomintrange( 100, 200 ), self.origin, undefined );
}
}

//AUDIO Plays a sound when Crawlers are created
if( IsDefined( self.a.gib_ref ) && (self.a.gib_ref == "no_legs") && isalive( self ) )
{
if ( isdefined( player ) )
{
rand = randomintrange(0, 100);
if(rand < 10)
{
index = maps\_zombiemode_weapons::get_player_index(player);
plr = "plr_" + index + "_";
player thread create_and_play_dialog( plr, "vox_crawl_spawn", 0.25, "resp_cspawn" );
}
}
}
else if( IsDefined( self.a.gib_ref ) && ( (self.a.gib_ref == "right_arm") || (self.a.gib_ref == "left_arm") ) )
{
if( self.has_legs && isalive( self ) )
{
if ( isdefined( player ) )
{
rand = randomintrange(0, 100);
if(rand < 3)
{
index = maps\_zombiemode_weapons::get_player_index(player);
plr = "plr_" + index + "_";
player thread create_and_play_dialog( plr, "vox_shoot_limb", 0.25 );
}
}
}
}
self thread maps\_zombiemode_powerups::check_for_instakill( player );
}
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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 LinksHarryBo000[email protected]HarryBo21
zombie_damage( mod, hit_location, hit_origin, player )

mod = the type of damage dealt

so MOD_RIFLE_BULLET for example

you can use this to work out the damage, or just have a second thread running that will "catch" the damage dealt
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
You could also start from zombie_gib_on_damage() in _zombiemode_spawner, that's allready waiting for damage being applied to the zombie. You can get the amount of damage, damagemod, damageweapon etc etc

Code Snippet
Plaintext
	while( 1 )
{
self waittill( "damage", amount, attacker, direction_vec, point, type );
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
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 LinksHarryBo000[email protected]HarryBo21
You could also start from zombie_gib_on_damage() in _zombiemode_spawner, that's allready waiting for damage being applied to the zombie. You can get the amount of damage, damagemod, damageweapon etc etc

Code Snippet
Plaintext
	while( 1 )
{
self waittill( "damage", amount, attacker, direction_vec, point, type );
What stuffy has showed you here, is pretty much the same as my double tap

to ensure it only added additional damage "once" i set self.doubletap = true;

after a frame, set is back to undefined, and had the check skipped if it was true

lol, without that, caused the wonderful infinite spawning points on Pros Nacht remake lol

 
Loading ...