#you would break the hit result from the

1 messages · Page 1 of 1 (latest)

hushed ocean
#

but how would i cast that information to the one receiving the damage?
I need for the damage receiver to know what specific component has been damaged the second it is damaged.

spark bone
#

Settup an interface, and pass data through that to the hit actor

hushed ocean
#

i've already got a system to generate damage based on line trace and specific channels with hitboxes blocking those channels. Any time the trace is blocked, apply damage to blocking actor. would making an interface mean redoing all that?

#

The receiver is receiving damage, but not hits for some reason as well. Even though the Generates Hit is activated.

spark bone
#

in that case the line trace "out hit" should return after breaking the result a hit component which is exactly what you are looking for

hushed ocean
#

i do get that yeah, the damage causer is outputting the correct hit component of the actor that is receiving damage. my issue is then somehow relaying that information to the receiver so they know what is being hit.

#

are you saying that is where the interface comes in? i was trying to find a solution via the "cast to" methods

deft heron
#

You want to fire an event between blueprints ? Use interfaces

spark bone
#

yes the interface is what you should be using instead of casting

#

create a interface and add it to both then create a function called component hit, add a output variable of object ref called component, after the hit result drag the hit actor line and add component hit (message)

#

plug in the hit component to that, then in your hit actor right click and type hit component should be under your interface and it will give you that data

hushed ocean
#

thanks so much for the help, I'll give that a try here.

spark bone
#

I would suggest watching some tutorials about interfaces they are extremly useful and are used almost always instead of casting

hushed ocean
#

Managed to get this working using PointDamage vs AnyDamage, but thanks for the help!