PAPVAFS11 Posted February 16, 2022 Share Posted February 16, 2022 I'm trying to improvise a simple armored VS unarmored check, mostly for the sake of headshots and so on. I'm using GetHitLocation in a perk to check the bodypart struck. Unfortunately, it seems that GetHitLocation is updating after the hit, so I can't adjust the damage correctly on the spot. Am I using this wrong? Is there a workaround? Or is this just not going to work? Link to comment Share on other sites More sharing options...
pepperman35 Posted February 16, 2022 Share Posted February 16, 2022 Not sure, but you might want to give this page a read. GetHitLocation Link to comment Share on other sites More sharing options...
PAPVAFS11 Posted February 17, 2022 Author Share Posted February 17, 2022 I've been over that page before. The thing is that GetHitLocation does actually work, and the Fallout 4 sister to that page seems to back that up. It's just reporting after the hit lands. So, for example, if I shoot a raider in the arm from a cold start, I get -1 on the first shot. If I shoot him in the head after that, GetHitLocation returns the arm. If I shoot him in the arm after that, it gives me his head as the hit location. I can't get the part struck at the exact moment it's struck. Link to comment Share on other sites More sharing options...
LarannKiar Posted February 17, 2022 Share Posted February 17, 2022 I don't think there's a workaround because you need to actually hit the target before "GetHitLocation" can return anything. You may want to use "WornCoversBipedSlot" instead. Here's a list of Fallout 4's body slots. Returns true if the subject wears a helmet or cap: Condition: WornCoversBipedSlot Parameter 1: Integer: 30 (or 31, see body slot list) Run on: Subject Comprasion: == Value: 1 If you'd like to alter the damage input for body parts, you need to edit the NPCs' Body Part Data. Link to comment Share on other sites More sharing options...
PAPVAFS11 Posted February 17, 2022 Author Share Posted February 17, 2022 I appreciate the advice, and I wasn't aware of the WornCoversBipedSlot condition before. Unfortunately, I'm struggling to figure out how that'd help me tell which part of a character has been hit. I'm aware of editing body part data. In fact, working with that was actually what gave me the idea to try this. I'd just hoped to be able to manipulate the incoming damage depending on whether the character is wearing armor where they're hit. If what I'm looking for isn't possible, I guess I'll just have to figure out something with scripts, or on-hit effects. Link to comment Share on other sites More sharing options...
DieFeM Posted February 17, 2022 Share Posted February 17, 2022 If you create an object mod for a weapon, and you attach an enchantment to it (Property modifiers->peEnchantments ADD), and this enchantment is set to "fire and forget" and "contact", with Target conditions using GetHitLocation and Effect archetype to "script", when you hit an NPC on the "Hit Location" corresponding to the condition then the OnEffectStart event in the script will be triggered. Link to comment Share on other sites More sharing options...
Recommended Posts