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 stop player health damage OnComponentEndOverlap?

Hi,

I have made a basic health system for my player that in enemy BP OnComponentOverlap we GetPlayerPawn and apply 1 Base Damage to it. I.E you your player gets attacked by bees/wasps. This works like a charm.

The problem I am having is stopping this damage after you leave the area of the bees/wasps Collision volume. I have tried OnComponentEndOverlap getting the GetPlayerPawn and setting the Base Damage to 0 but this has no effect.

So, How do I stop it constantly appling damage to the player after he leaves the collision area?

Product Version: Not Selected
Tags:
more ▼

asked Nov 20 '14 at 06:51 AM in Blueprint Scripting

avatar image

FirstParadox
65 3 9 12

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

1 answer: sort voted first

Hi FirstParadox,

Can you show me what you have going on in your blueprint? I might be able to see what is happening and how to get it to do what you want.

more ▼

answered Nov 20 '14 at 07:34 PM

avatar image FirstParadox Nov 20 '14 at 07:56 PM

Hi Adam,

Thanks for your reply, I continued to work on this problem and although it has taken me most of the day I have found a 'work around'. It is not the best solution as it is checking for distance every tick. but htis is what I have ended with.

If you have any suggestions as to how I could implement this is a less intensive way, please do share. alt text

avatar image Adam Davis STAFF Nov 20 '14 at 08:14 PM

Hi FirstParadox,

What I would do instead is create a gate that is opened when your player overlaps the component. Your tick feeds into the "enter" input. Then your end overlap plugs into your "Close" input. This will open the gate so that the tick can enter when you are within the overlap but closes the gate so no information can pass when you end the overlap. Try that and see if it does what you want.

avatar image FirstParadox Nov 20 '14 at 08:42 PM

Thats done the trick, thanks. Here is the final BP for anyone else with this problemalt text

(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