Jump to content

Home

razorace I need some help with hit locations


Paladin888

Recommended Posts

This goes out to anybody who can answer, but I mention razorace because I have been restepping his path of creating hit locations with ghoul2. I still consider myself newbish to coding, but I’m well rounded in all other areas. After looking at the jk2 source for a couple days I have a general understanding of what is going on.

 

I have read the post http://www.lucasforums.com/showthread.php?s=&threadid=96039&highlight=ghoul2 and you mentioned that there is enough explanation in this post to get a hit location system to work. What are all the files involved in the process of creating a hit location system (dealing damage and checking where projectiles hit the body)? What parts of those files should I focus on?

 

I am sure I will have many questions in a couple weeks when I just can’t seam to get a hit location system to work but I didn't want freebee/handout code (yet ;) hehe). Rather, I want to understand for myself what is going on with hit locations and how the damage system works. Right now I’m overwhelmed and need some training wheels and a kick start. Any help would be greatly appreciated.

Link to comment
Share on other sites

Ok, the short answer....

 

You're going to be using a special part of the ghoul2 tracing system to do hit locations. A ghoul2 trace basically fires a 3D rectangular object thru a given area of space and reports back all the objects that it hit (with a bunch of data. The data you want is the surface identification number (of the first thing you hit). This relates directly to a surface area on the model. What you're going to be doing is take that data, translate it to a hitzone and then use that data to do your damage function.

 

I think (it's been a while since I've touched the code) the names of the functions you need to play with are...

g_damage()

ghoul2trace()

 

BTW, I'm not the original discoverer of this. Jaii Herr gets all the credit. I was simply the first one to impliment it.

Link to comment
Share on other sites

Thanks for the response. I've been trying to make sense of how damage is dealt, the ghoul2 system, and tracers, but I've burnt out and my brain is gonna blow.

:explode:

Perhaps I will look back into this in a while. Until then I'm gonna do something easier like solve a rubix cube. Why oh why didn't they just have a hit location in their multiplayer code? Was it their personal effort to make their game dull and my life a living hell? I just wanna make a custom mod for some lan parties and a hit location system is a must. C is from Satan, it just has to be.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...