Fire an event on actor hit by trace?
Basically what I'm trying to do is a simple system, that allows me to "use" objects that I'm looking at in first person. The basics of many FPS games. I'm trying to do this by firing a trace line on my player character from his eyes and getting the hit actor. My question is - I've prepared the neccessary events on those actors, but how can I activate them with this trace? I cannot cast, because I don't know what I will hit with the trace. I'm not sure if I should use event dispatchers or interfaces.
Can anyone point me in the right direction? Basically I need a press "e" to use function, but not trigger volume based but looking at based.
asked Oct 20 '15 at 11:44 AM in Blueprint Scripting
You can use a blueprint interface to achiev that. Blueprint interfaces allow firing events (or calling functions with outputs) in blueprints using them. Just arrange your blueprints accordingly and use the hit results (after breaking them) to send the necessary message to the actor hit.
You can use the same principle to display messages on your hud as well, e.g. "Press E to use/open/unlock".
answered Oct 20 '15 at 12:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here