Run custom event in given actor
I'm tracing the position of the mouse to get the object under the cursor position, I also have different actors in the world where some have a certain tag. Now I'd like to run a custom event if the trace hits an object with the given tag. The event is called the same in every actor with that tag and every actor with that tag has that custom event.
So, I'd like to know if there is a quick way to just run that event without getting which object it is (which Blueprint), then casting and all that? Just something like if it has that tag, run the custom event with that name.
asked Apr 22 '16 at 12:06 PM in Blueprint Scripting
From the Hit Result you can check if the Actor has the tag or no by using ActorHasTag node.
Even though you can use this method, my personal suggestion is to use Interface. It would be the best choice in this situation.
answered Apr 22 '16 at 12:32 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here