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"

How to Overlap a subObject?

I'm trying to do a Beat'm'up game, like GoldenAxe, StreetsOfRage ... etc

In the Blueprint of the Player I create a CapsuleCollision. My intention is to remain deactivated and when I attack it activates a few moments. If the BoxCollider reaches the enemy, it will hurt him.

How can I create an "Overlap Event" only from a sub-object of the Blueprint? "OnEventOverlap" refers to all the player's objects, I just want to do it with the BoxCollider that I created. alt text

Maybe can be better create another BluePrint to do the Hitbox?

Product Version: UE 4.18
Tags:
more ▼

asked May 05 '18 at 07:07 PM in Blueprint Scripting

avatar image

Charditronic
5 1 1 6

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

1 answer: sort voted first

you want to use the on component begin overlap. to get this event you just need to select your hitbox collider, then right click it and select add event, then add oncomponentbeginoverlap. this will be a overlap event that only trigger when that component is overlapped. from there you will just need to define what you want to be able to trigger the script so that it doesnt get overlaps from things unintended like walls (this is optional but it is advised). in the example in the picture below i used a cast to enemy to restrict what other actors can be affected by this script, so basically only enemies will take damage or do whatever comes after the cast.

alt text

capture.png (119.0 kB)
more ▼

answered May 05 '18 at 07:19 PM

avatar image

ThompsonN13
10.1k 33 10 23

avatar image Charditronic May 05 '18 at 08:09 PM

This is exactly what I was looking for! Thanks! d(^_^)b

(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