Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 60 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Map + Mod Releases
Release announcements of custom maps and mods other content related to Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: how determine the body part where bullet was shot
saqibvohra93
General Member
Since: Feb 24, 2015
Posts: 3
Last: Feb 25, 2015
[view latest posts]
Level 0
Category: CoD4 Map + Mod Releases
Posted: Tuesday, Feb. 24, 2015 12:13 am
Hi, I am a computer science student working on a project to make gaming experience more realistic. I am currently stuck as I cant find a way to determine the body part where the bullet was shot. I need to locate the body part like hand, arm, head, chest etc as the bullet hits the user.

Do anyone knows if there are currently any mod available for a good FPS game like CS:GO, Battlefield, Call of duty etc. that can fulfill my requirement.

If currently not available, can anyone let me know if there is a possible way to develop such mod in these games.

I would be grateful if you can help me with these issues.

Thank you :)
Share |
DrBiggzz
General Member
Since: Apr 9, 2007
Posts: 98
Last: Sep 24, 2022
[view latest posts]
Level 3
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Map + Mod Releases
Posted: Tuesday, Feb. 24, 2015 02:46 pm
So as in you want what to happen in the obituary there is a line that says player1 killed player2 hitlocationhere ? there are many mods that can make this happen. Cod 4 i couldnt tell ya but for cod uo it is as simple as adding the hitlocs to the obituary. If you need something to search for to help search call of duty 4 detailed obituary mod. You should find something that can help you.
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 Map + Mod Releases
Posted: Tuesday, Feb. 24, 2015 03:14 pm
i think CoD uses Hitbox for the character. i
found a multiPlayer_HitBoxModelChar in
CoD4/Model_export/base_character.
this model is added in asset manager
when you make an Xmodel, under
hitBoxModel, so my guess is that this is
how the game knows what part of the
character has been hit.
you can open this hitbox model in maya or
blender (need xmodel_export addon) and
you will see how it is made.
every part/bone has it's own name, like j_
head, j_neck, etc...
Share |
saqibvohra93
General Member
Since: Feb 24, 2015
Posts: 3
Last: Feb 25, 2015
[view latest posts]
Level 0
Category: CoD4 Map + Mod Releases
Posted: Tuesday, Feb. 24, 2015 09:29 pm
Thanks alot DrBiggzz, I am looking at it.

@trinkx, thanks for your detailed reply. But I cant figure out how using the model I can detect the part and send signal to a background process running.

If I can able to find that model, then how can I actually detect that this body part was hit, If I can print it in the console or anywhere from where I can detect easily. Can you help me with anything?

Thank you :)
Share |
TrikX
General Member
Since: Jul 7, 2012
Posts: 129
Last: Dec 31, 2016
[view latest posts]
Level 4
Category: CoD4 Map + Mod Releases
Posted: Tuesday, Feb. 24, 2015 10:14 pm
that is done by scripting. you should find yourself a good modder, they do that kind of stuff in mods, when you make a headshot it displays a message on the screen. i'm a mapper so i don't need to script a lot.
hope you will find someone who knows how to do it.
Share |
DrBiggzz
General Member
Since: Apr 9, 2007
Posts: 98
Last: Sep 24, 2022
[view latest posts]
Level 3
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Map + Mod Releases
Posted: Wednesday, Feb. 25, 2015 12:04 am
in call of duty uo the hitlocations are as follows

Code:
getHitLocName(hitloc)
{
	switch(hitloc)
	{
		case "right_hand":	return "Right  Hand";
		case "left_hand":	return "Left Hand";
		case "right_arm_upper":	return "Right Upper Arm";
		case "right_arm_lower":	return "Right Forearm";
		case "left_arm_upper":	return "Left Upper Arm";
		case "left_arm_lower":	return "Left Forearm";
		case "head":		return "Head";
		case "neck":		return "Neck";
		case "right_foot":	return "Right Foot";
		case "left_foot":	return "Left Foot";
		case "right_leg_lower":	return "Right Lower Leg";
		case "left_leg_lower":	return "Left Lower Leg";
		case "right_leg_upper":	return "Right Upper Leg";
		case "left_leg_upper":	return "Left Upper Leg";
		case "torso_upper":	return "Upper Torso";
		case "torso_lower":	return "Lower Torso";
		case "none":		return "Pelvis";
		default:		return hitloc;
	}
}


^^now im not sure but i believe most cods use these body tags.^^


Code:
	// If the player was killed by a head shot, let players know it was a head shot kill
	if(sHitLoc == "head" && sMeansOfDeath != "MOD_MELEE")
		sMeansOfDeath = "MOD_HEAD_SHOT";
		
		
/*=============Added By C()D3R=============*/
//		Shows All That A Player Got A Headshot, Bash Kill Or Grenade/Satchel Kills. 
//		Sets The Points For A Headshot To Be Worth 2.
//		Shows All That A Player Committed Suicide.
	{
		if(sMeansOfDeath == "MOD_HEAD_SHOT")
		{
			attacker.score++;
			attacker.pers["headshots"]++;
			iprintlnbold(attacker.name + " ^3Scored A HeadShot On " + self.name + "");
			attacker iprintln("^1[^3HeadShot^1]^2Gained ^12^2Points!");
			maps\mp\antic\_antic::popHead(damageDir, damage);
		}


here is also a snippet of my headshots script this gives the player 2 points and displays that he scored a headshot.




there are easier ways to bring up the hitlocations but this is the method i currently use. I will post another method using the obituary to give detailed information about kills. once i script one up and get it working correctly.
edited on Feb. 24, 2015 05:29 pm by DrBiggzz

edited on Feb. 24, 2015 05:40 pm by DrBiggzz
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD4 Map + Mod Releases
Posted: Wednesday, Feb. 25, 2015 12:23 am
saqibvohra93 writes...
Quote:

@trinkx, thanks for your detailed reply. But I cant figure out how using the model I can detect the part and send signal to a background process running.

If I can able to find that model, then how can I actually detect that this body part was hit, If I can print it in the console or anywhere from where I can detect easily. Can you help me with anything?


You will have to make a mod that prints to a log file (using the logPrint() function) whenever a player is hit and then have your program monitor that log file.
The log file it prints to is set by the g_log setting, usually set to "games_mp.log" and located in the mod directory. You also need to make sure g_logSync is set to "2" so that data is written immediately.
Share |
DrBiggzz
General Member
Since: Apr 9, 2007
Posts: 98
Last: Sep 24, 2022
[view latest posts]
Level 3
Forum Moderator
Im a fan of MODSonair
Category: CoD4 Map + Mod Releases
Posted: Wednesday, Feb. 25, 2015 12:36 am
ah, killer i misunderstood him i guess.
Share |
saqibvohra93
General Member
Since: Feb 24, 2015
Posts: 3
Last: Feb 25, 2015
[view latest posts]
Level 0
Category: CoD4 Map + Mod Releases
Posted: Wednesday, Feb. 25, 2015 01:10 pm
Thanks alot guys, you guys are best people ^_^

Dr.Biggzz, your suggestion also helped, thats what actually I am looking for, when a person gets shot any where in the body, I want to locate where(body parts) the bullet was hit and print it to a file(or anything from which I can keep track of hits) and process it accordingly. What you suggested seems like what I am trying to do.

@Killer, your comment also helped me.

I am currently learning how to mod COD4 and will try to implement on your suggestions and will let you know. :)

I will let you know if any further supervision of yours is required. :)

Please let me know if there is anything else that could help me in this regards.

Thank you :)
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Map + Mod Releases

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»