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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Adding A "Safe Zone" Inside Another Collision Box?

I have added rain to the project I'm currently working on and I turned it into acid rain. You take damage if you're caught in the rain. Added a box collision in the surrounding particle area where you can take damage.

I was wondering if it was possible to make a sort of "safe zone" within the existing collision box that is causing damage? There will be places you can go for shelter and protect yourself from the rain.

Any help would be great!

~Randy

Product Version: UE 4.22
Tags:
more ▼

asked May 08 '19 at 07:18 AM in Blueprint Scripting

avatar image

randenie
3 1 2

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

1 answer: sort voted first

You could create a Collision box that adds a "Safe State" to the player when he is overlapping and this "Safe State" is checked when you do damage from rain.

alt text alt text

safezone.png (126.6 kB)
noraindamage.png (140.5 kB)
more ▼

answered May 08 '19 at 01:04 PM

avatar image

Lardo Deepdelver
941 6 4 6

avatar image Lardo Deepdelver May 08 '19 at 03:51 PM
  • did you add a new damage type,

  • is the any damage event being called

  • how do you apply your damage

  • is the in safe zone being set

:P some questions that might clarify what goes wrong

avatar image randenie May 08 '19 at 04:07 PM

-Damage type is AcidRain

-The damage occurs when entering the collision box.

  • have it set when entering the acid rain, it causes damage every .5 seconds.

-Made a print string to see if it does and it shows it is calling to it.

avatar image Lardo Deepdelver May 08 '19 at 04:12 PM

isn't that what you want to happen?

avatar image Lardo Deepdelver May 08 '19 at 04:26 PM

How is the damage applied to your actor?

Did you reroute it through the take any damage event on your actor?

avatar image randenie May 08 '19 at 04:31 PM

It occurs when overlapping and calls to the character's health to take away health if it's over 0. It then does damage every .5 seconds by the "AcidRain" damage class.

avatar image Lardo Deepdelver May 08 '19 at 04:34 PM

how do you apply the damage? Do you call a do damage function or do you just reduce the health every 0.5 seconds until you leave?

avatar image randenie May 08 '19 at 04:45 PM

It's does a damage function and applies damage until you leave the acid rain box.

avatar image Lardo Deepdelver May 08 '19 at 04:48 PM

can you make a screen shot of how that works?

In theory, you would just need to check for the safe state where you apply damage.

avatar image randenie May 08 '19 at 05:00 PM

Currently at work. Won't be able to for about 8 hours. Hope you're around then! Lol

avatar image Lardo Deepdelver May 08 '19 at 05:03 PM

probably not, will take a lock in the morning :P

avatar image randenie May 09 '19 at 01:33 AM

Hey! Just letting you know that a friend and I figured it out. Thank you for your 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