HeadShotsOnly

Ask questions, discuss ideas, get answers
Post Reply
code red
Posts: 29
Joined: Wed Jun 30, 2010 3:43 am

HeadShotsOnly

Post by code red »

O.k. I am making a mod and I would like to make one team have head shots only. I found this code under damnage systems/colt

Code: Select all

rem * *************************************************
rem *      Infantry target
rem * *************************************************
MaterialManager.attGroup 214
MaterialManager.defGroup 40
MaterialManager.damageMod 5
MaterialManager.setEffectTemplate e_blood01

MaterialManager.attGroup 214
MaterialManager.defGroup 41
MaterialManager.damageMod 0
MaterialManager.setEffectTemplate e_blood01

MaterialManager.attGroup 214
MaterialManager.defGroup 42
MaterialManager.damageMod 0
MaterialManager.setEffectTemplate e_blood01
and I have been told the defGroups refer to the body sections (40=head, 41=body, 42=legs) and I would like to verify this and also what should I change to make the weapon only damage the head and not effect the rest of the body. thanks
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

code red wrote:I have been told the defGroups refer to the body sections (40=head, 41=body, 42=legs) and I would like to verify this
that is correct
code red wrote:and also what should I change to make the weapon only damage the head and not effect the rest of the body. thanks
taking for example the colt, you have to look at what material the colt-projectile is using and then change the damage properties accordingly

theres some things to think about tho, you cant change a materials damage per map basis by just pasting in that code you posted (it dont bite). if you want to change it it has to be done in the game.rfa file thus affecting all maps.

if you want it to work per map basis only you have to make up a new material with the wanted conditions and put it in the map (this will bite) and then change the colt-projectile (also per map basis) to that new material

if you want the headshot only to aply to all weapons in one team you could use the colt-projectile for more weapons to save some time and code lines
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: HeadShotsOnly

Post by Swaffy »

code red, it seems as if you already have the damage set up in the coding you provided.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply