Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.11
more ▼

asked Apr 22 '16 at 12:06 PM in Blueprint Scripting

avatar image

3 2 3 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

From the Hit Result you can check if the Actor has the tag or no by using ActorHasTag node.

alt text

Even though you can use this method, my personal suggestion is to use Interface. It would be the best choice in this situation.



actorhastag.png (50.6 kB)
more ▼

answered Apr 22 '16 at 12:32 PM

avatar image

1.6k 56 43 93

avatar image Bluegru Apr 27 '16 at 05:17 PM

thx for the information, I've already got the tag, but had to check what type it is, then cast to it and then run the event, but interface sounds really intersting I'll check it out

Edit: Was exactly what I needed, thx for the help

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question