How do I enable/connect my resistances?

Hi. I couldn’t think of the proper phrasing for the question. Any help or advice is appreciated.

Basically, I have my BaseArmour resistances set up and I have my BaseWeapon damage and accuracy set up. It works using a formula to roll the damage against the defence, then do damage. I have a structure for both the weapon and armour, if that helps.

The problem I’m having, is that I’m not sure how to connect these (my resistances in the BaseArmour blueprint)

To these (my accuracy/damage output in my BaseWeapon blueprint)

You need a reference to the other object to be able to combine the variables together. When a base weapon fires, it should know the character it hit, and which armor the character was wearing. Then you can calculate the final damage.

First off, how are you going to determine if you hit something. Using line traces is a pretty common way of doing so. A line trace will return a hit structure, which contains the hit actor as well as other data. You can use casting to determine if your hit actor is a Base Armor actor, or your character who is wearing “Base Armor” (again, not sure how you’ve set it up so far). Line traces arent the only way to determine if something was hit, you can use overlap events from collision triggers as well.

Once you’ve casted to the Base Armor class, you can directly access the variables from that class, and use them to modify the final damage.

A high level example of how you might set something like this up

Character fires > Weapon Fires > Weapon traces what was hit, finds the second character, finds the armor he owns, calculates how much damage to apply to the second character > Applys the damage event to the second character.

Some additional reading that might help you out:

Hope this helps!

minecraft is way so do you know the way grande knuckles