News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 20th Jan 2004, 04:37 PM   #1
Csimbi
Registered User
 
Join Date: Nov. 3rd, 2003
Location: Right here.
Posts: 6
2 in 1

Hi all,
as title says I have two issues in a post that I would like to solve.
I would need these issues solved for a weapon mutator I am developing the UT GOTY.
#1.
How can I force a bot to look for another target and leave the current target alone? (Leaving alone means not to stand there and keep looking, not to fire a single bullet, but walk away and look for another target until this particlar target has my weapon is his inventory.)
I tried states, fearthisspot, etc, but it does not seem to work. Either UT crashes, or there is a _long_ log containing "accessed none" entries, or simply the bots do not do what I want and keep firing at the target.

#2.
I would like to ask the local vector dealers to put their constructive mind together a little, and solve this problem.
What I would need is exact hit location. It means I would like to be able to verify that where on earth (which bodypart) did the bullet hit the victim (this would be called from the MutatorTakeDamage, so the victim, the HitLocation, and the Momentum are available).
And I would need this in a way that it is model-independent - so it takes the current scale and model into account. (So that it would work for males, females, moo, nali, skeletal, skaarj, and even custom models.)
I would need it to determine whether the bullet hit the head, upper or lower arms and legs, chest (maybe heart), crotch, knee, wrist, feet.

Big thank You in advance.
Csimbi is offline   Reply With Quote
Old 20th Jan 2004, 07:03 PM   #2
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
For your second question, it isn't possible due to the nature of the vectors in the game. Basically what were asking here is a vector calculation based on the bone system of the model, which can be done somewhat but not as precise as your wanting it to be.

For a start, you can do basic hit location scans such as looking to see if it hit the head, but it basically works like this (in theory). If the HitLocation.Z is equal to Location + Pawn.EyeHeight * (Vect(0,0,1)) Z value, then a head shot is true. Of course UT has a range of values here (neck and tip of head) but as you can see it is just working off the height height compared to the hitlocation and to the location of the pawn. From here you can do other smaller changes such as midsection hit and legs hit.

UT2003 is a little more accurate. It does it in this method. HitLocation, function GetClosestBone(HitLocation, BoneName) [Or something along these lines]. That way you get back a Bone Name (in var BoneName) and if it equals 'Head' then you do the head shot code from there, else do other stuff. Because this is done using bones, it's model inspecific ... just as long as the models have the same naming conventions as they do in the script of course.

In short, I don't believe you can do what your wanting in UT. There are however some shortstop solutions. You can instead build the model up from several bits and pieces and each one would relate back to the central actor. Or spawn several pieces that cover a certain region of the model, which take care of the specific hit locations.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 21st Jan 2004, 11:33 AM   #3
Csimbi
Registered User
 
Join Date: Nov. 3rd, 2003
Location: Right here.
Posts: 6
I think that the solution#1 is not feasible.
How can I add special surfaces to each spot I would like to detect? (In a way that it supports custom models also?
Csimbi is offline   Reply With Quote
Old 21st Jan 2004, 05:50 PM   #4
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
You spawn several actors which detect the hitcollision (they hit collision boxes are slightly larger than the models one).
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 22nd Jan 2004, 02:26 AM   #5
Csimbi
Registered User
 
Join Date: Nov. 3rd, 2003
Location: Right here.
Posts: 6
Right, but:
How do I calculate where to spawn the actor/and keep it moving with the owner?
Csimbi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:09 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer