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

Hit Location for AI

broken avatar :(
Created 11 years ago
by greattomato
0 Members and 1 Guest are viewing this topic.
2,186 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 19 August 2015
Last active: 11 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
greattomato's Groups
greattomato's Contact & Social Links
Hey Everyone,

Very new to modding cod and I've been trying to figure out how to tell if the player kills an enemy AI with a headshot.  I've found some stuff for ai_lochit_dmgtable...and i've combed through a lot of source maps, but i don't see anyone reference this anywhere.  Would someone be willing to point me in the right direction?
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
look at zombie_damage() in zombiemode_spawner.gsc
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
This code notify table may help: http://ugx-mods.com/downloads/CoD_Code_Notifies.pdf

For a list of the different mod types:

Code Snippet
Plaintext
"MOD_UNKNOWN",
"MOD_PISTOL_BULLET",
"MOD_RIFLE_BULLET",
"MOD_GRENADE",
"MOD_GRENADE_SPLASH",
"MOD_PROJECTILE",

"MOD_GRENADE_SPLASH",
"MOD_PROJECTILE",
"MOD_PROJECTILE_SPLASH",
"MOD_MELEE",
"MOD_HEAD_SHOT",
"MOD_CRUSH",
"MOD_TELEFRAG",
"MOD_FALLING",
"MOD_SUICIDE",
"MOD_TRIGGER_HURT",
"MOD_EXPLOSIVE",
"MOD_IMPACT",

The "kill" notify supposedly doesn't have a mod argument that you can get using waitTill(atleast SparkyMcSparks didn't put it in the notify list) so you'l have to do a workaround using damage instead.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Hey Everyone,

Very new to modding cod and I've been trying to figure out how to tell if the player kills an enemy AI with a headshot.  I've found some stuff for ai_lochit_dmgtable...and i've combed through a lot of source maps, but i don't see anyone reference this anywhere.  Would someone be willing to point me in the right direction?

Couldn't you just check the players headshot_count attribute and/or player.stats["headshots"]?

If this counts headshots even when the headshot does not kill the zombie, then you could simply add another attribute to the stats array or to the player, and update it after checking if the zombie is dead, or health is <= 0 in the spawner gsc, zombie_gib_on_damage function, under where it sets attacker.stats....?
Last Edit: August 20, 2015, 04:11:07 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 19 August 2015
Last active: 11 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
greattomato's Groups
greattomato's Contact & Social Links
Hm I think this self wait thing is what i need.  I'll explain a little better what i'm trying to do.  Basically I'm trying to set up the game so you have to kill an enemy in order to gain health back.  So i've got all the bad guys and have them all wait to see if their damaged.  Then if they are your health goes back full right now.  Only problem I'm having is getting the health regen to turn off, and id like to switch it to headshots eventually.  I'll give using the stats a shot tommorow, but if anyone knows how to turn health regen off as well that'd be a huge time saver.

Here's my horrible code if anyone is interested:

Code Snippet
Plaintext
main()
{
maps\_load::main();

level.player takeallweapons();
level.player giveWeapon("mp5");
level.player switchToWeapon("mp5");

  myArray = getentarray("badguys", "targetname");
for(i=0;i<myArray.size;i++)
{
myArray[i] thread HealthController();
}
thread HealthController();

}


HealthController()
{
CanRegen = false;
CurrentPlayerHealth = level.player.health;
while(1)
{
if(CanRegen)
{
level.player.health = level.player.maxhealth;
CurrentPlayerHealth = level.player.maxhealth;
iprintlnbold("hey its not crashing");
CanRegen = false;
}
else
{
level.player.health = CurrentPlayerHealth;
}
self waittill("damage", damage, attacker, direction_vec, point, type, modelName, tagName);
CanRegen = true;

}
}
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Code Snippet
Plaintext
zombie_death_points( origin, mod, hit_location, player,zombie )
in _zombiemode_spawner

add something like this



Code Snippet
Plaintext
zombie_death_points( origin, mod, hit_location, player,zombie )
{
//ChrisP - no points or powerups for killing zombies
if(IsDefined(zombie.marked_for_death))
{
return;
}

if( zombie_can_drop_powerups( zombie ) )
{
level thread maps\_zombiemode_powerups::powerup_drop( origin );
}

if( !IsDefined( player ) || !IsPlayer( player ) )
{
return;
}

// DUKIP - here
if(hit_location == "head")
{
player IPrintLnBold("BOOM HEADSHOT");
}

//TUEY Play VO if you get a Head Shot
//add this check ( 3/24/09 - Chrisp)
if(level.script != "nazi_zombie_prototype")
{
level thread play_death_vo(hit_location, player,mod,zombie);
}

player maps\_zombiemode_score::player_add_points( "death", mod, hit_location );
}

 
Loading ...