Home   Help Search Login Register  

Author Topic: hitArmor etc. Where does "Armor" come from?  (Read 1735 times)

0 Members and 1 Guest are viewing this topic.

cornhelium

  • Guest
hitArmor etc. Where does "Armor" come from?
« on: 02 Mar 2005, 01:52:16 »
Hi there,

Looking through various configs I often see lines like (from the JAM config):

Quote
soundHitMan4[]={"\JAM_Magazines\soundhit\hit_man5.wss",0.012589,1};
...
soundHitArmor1[]={"\JAM_Magazines\soundhit\hit_metal1.wss",0.031623,1};
...
soundHitBuilding1[]={"\JAM_Magazines\soundhit\ric1.wss",0.031623,1};

Looking through the main OFP config, I can see class man and class building, but no "class Armor". Likewise, in the CfgTextureToMaterial and class CfgMaterials sections there is an entry for "Metal" but >none< for "Armor".

This leads me to believe that these definitions come from somewhere else - maybe defined surfaces in the model itself?

Could anybody let me know where these definitions are pulled from please, and if there are any more like wood, brick, glass etc. ?

It would be great to get separate hit sounds for as many different surfaces as possible.

Many thanks,
Cornhelium


Kyle Sarnik

  • Guest
Re:hitArmor etc. Where does "Armor" come from?
« Reply #1 on: 02 Mar 2005, 02:55:46 »
hitArmor is the sound it uses when it strikes any type of vehicle.

cornhelium

  • Guest
Re:hitArmor etc. Where does "Armor" come from?
« Reply #2 on: 02 Mar 2005, 12:25:04 »
Hi Kyle,

Yes - but how does the bullet "know" it is hitting armor? I don't see any link between the two anywhere in the config  ???

Eg. In class CfgVehicles there is no mention of vehicles having "Armor" properties (sure, they have armor values but so do men and buildings, so that cannot be the link)

...any insight would be much appreciated  8)

Cheers,
CH

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:hitArmor etc. Where does "Armor" come from?
« Reply #3 on: 02 Mar 2005, 13:16:17 »
don't understand armor in a too narrow sense here.
the soundhitarmor is played when the bullet hits a vehicle that is subclassed under landvehicle i think. i.e. cars, apcs, tanks, static guns, boats, etc.  
so this is a cpp issue insofar as you have to make vehicles subclasses of existing ones (otherwise they wouldn't functtion as they should),  but you don't define in the cpp 'armor = true' or something.  you can give a vehicle an armor value of 0.000001 or so , but that would still make the game engine play the soundhitarmor if you shoot at it with your weapon.
we're looking for members: IM:UC MOD

cornhelium

  • Guest
Re:hitArmor etc. Where does "Armor" come from?
« Reply #4 on: 02 Mar 2005, 14:35:04 »
Thanks remcen, but I still don't get it. Here's an entry in the config for class Man:

Quote
   class Man: Land
...
armor=3

...so the Man class also has armor defined in just the same way as a Tank or a Helicopter, but the Man class uses the HitMan sounds.

Also, look at the building entry:

Quote
class Building: Static
...
armor=150

Again, armor values are defined in the same way, but buildings use the sounds defined for the hitBuilding "event".

So...how does the OFP engine "know" how to use hitArmor, hitMan, hitBuilding, hitGround etc? If it plays the sounds according to whether an entity is a man, building, vehicle or ground, where is this link defined?

I just don't see any entry in the config that links the classes to the event.  :'(

Thanks again,
CH
« Last Edit: 02 Mar 2005, 14:36:56 by cornhelium »

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:hitArmor etc. Where does "Armor" come from?
« Reply #5 on: 02 Mar 2005, 14:48:24 »
different hit sounds for different subclasses - hardcoded if i should guess.
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:hitArmor etc. Where does "Armor" come from?
« Reply #6 on: 02 Mar 2005, 20:20:47 »
Its not defined anywhere, HitArmor will always play when it hits any type of vehicle, land or air. Its hardcoded, simple as that, nothing else to it.

cornhelium

  • Guest
Re:hitArmor etc. Where does "Armor" come from?
« Reply #7 on: 02 Mar 2005, 22:45:22 »
Thanks guys for clearing that up  ;D

Cheers,
CH