x

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"

Is there a way to overlap with more than one class/actor?

Dear whoever reads this,

I am struggling to find a way to cause damage to multiple enemies in my game. In the picture, you can see that I have a melee capsule, which is placed in front of my character, that allows the character to cause damage to anything inside the capsule. Then underneath, I have 2 different types of AI (enemies) which are called 'AI Default' and 'AI Assassin'. If I plug one of them in, I can damage any of that actor in my game. But I want to be able to cause damage to both types of enemy instead of only letting me choose 1 type of enemy.

The reason I have two different blueprints for the enemies is so I can use different attacking animations.

Is there a way to do this?

Maybe by detecting multiple classes in the collision?

alt text

Product Version: UE 4.13
Tags:
more ▼

asked Apr 21 '17 at 04:33 PM in Blueprint Scripting

avatar image

Noah Evans
1 2 3

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

1 answer: sort voted first

I know this sounds stupid, but why don't you call your procedure two times? The first time with the results from "AI Default" and the second time from "AI Assassin".

Alternatively you can just get all actors in your capsule and then try to cast your "Array Element" from "ForEachLoop" to "AI Default" and to "AI Assassin" and apply only damage to it if one cast succeeds.

more ▼

answered Apr 21 '17 at 04:43 PM

avatar image

Benergy
831 21 4 29

avatar image Noah Evans Apr 21 '17 at 04:53 PM

I'm such an idiot haha. Thank you for making me realise that I can just set the Class Filter as 'Actor' instead of a specific actor.

avatar image Benergy Apr 21 '17 at 05:27 PM

I'm glad I could help, but please consider accepting my answer for my karma ;)

(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