• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Critical Hit Locations

otester

Grizzled Veteran
Mar 7, 2006
366
5
In a previous post in a thread in the wrong place, Ramm told me that

The internal hit areas are defined in the VehHitpoints array.

How would I go about doing this considering I would not know the exact areas on the tank visually while coding?

Also can the "VehHitpoints" do anything other than make the tank explode, for example a crew member that gets hit dies?

Oh yeah and last of all where do I go about doing this?


Many Thanks,

Oli
 
http://redorchestragame.com/forum/showthread.php?t=16462

and you should make yourself familiar with the vehicle and the tank classes. As far as the engine is concerned you could spawn some hookers once a certain hitzone is hit...

you will get a problem with letting a player die though. You have a restricted amount of hitzone types defined.
which are, driver, ammo and engine.
If you use those for your hitzones, the same effect shooting this zone has will happen with every other zone of that type.
 
Upvote 0
you could spawn some hookers once a certain hitzone is hit...

Giving a whole new meaning to the term "penetration point". :)

You have a restricted amount of hitzone types defined.
which are, driver, ammo and engine.
If you use those for your hitzones, the same effect shooting this zone has will happen with every other zone of that type.

What about HP_Normal? I saw only the one reference of it when I searched with UnCodeX. Understanding that if it is used later there is still the issue of having the same effect that you mentioned above.
 
Last edited:
Upvote 0
So probably the best thing to do is to define new array of hitpoints, with more types, and use them instead of existing ones. Also there is no ammo-type hitbox for turret, it has to be added too...

As for knowing where in tank is the hitbox (or rather hitsphere) you are adding, the only way I have in mind is to run the SDK, take anim browser, turn the tank into wireframe view, enable collision view, create a collision sphere and set it to numbers (x, y, z, radius) you want your hitbox to be and then you can see where it places in tank model. Maybe there is better way, I didn't know it. The debug view of player collision spheres can be enabled as Ramm wrote in other thread, but I guess it's useless for hitboxes located inside of tanks (you would just not see them trough armor) ?
 
Last edited:
Upvote 0