Trigger Safe Spot.

Hello, I have a blueprint that has a Box Collision in it around my whole level. And that box collision is setup so that if the player enters it his health drops over time. But what i need to know is how can i setup a “Safe Spot” that the trigger does not work in. For example There is a house and that house is surrounded by the trigger box that hurts you when you are inside. How do that player not take damage inside the house. Please i have been trying to figure this out for well over a hour now ;/.

Lol… Piece of cake, make a 2nd box trigger around your safe spot, and have a Boolean. The Boolean needs to be an AND Boolean. The first one needs to be if player is in 1st trigger, the 2nd one needs to be if player is not in safe spot trigger.

I’m not sure what you mean. The Damage trigger is a component inside a actor blueprint. I cannot put another trigger into that same blueprint because i want to have multiple safespots and it would be to hard to try to move it around in the blueprint to put it where i need in the world.

Not sure what you mean, if the damage trigger is a component, can’t you just make a trigger, and have it so that the damage only happens when player isn’t in trigger?

Because i tried it with the level blueprint and i couldn’t get it to work. So i made it its own blueprint. Let me try to explain some more. I Have a DamageArea blueprint and a SafeArea blueprint each only have a box collision component in them. The DamageArea blueprint has all of the damage and code inside it and its spread around my whole level. i want to place a few SafeArea blueprints inside the level and have the damage stop from the other blueprint when i am inside the safe area collision component. That is where i’m stuck right now.

Jamendxman3,

I like your style here. Thinking outside the box.

Firezown, If the player is not in the SafeArea box have him take damage, If every area is a damage area except for the safe zones then you don’t even need a damage area, you need non-damage areas.

Yep Fire, you just need a way for the damage BP to know when you are also in the safe area, you should make a Boolean variable in your game mode class, let’s call it ‘isSafe’, default should be false. Now in your safe area BP (when you enter safe area), cast to your game mode class, use ‘get game mode’ as the object. on the ‘as game mode’ return node, connect that to ‘set isSafe’ and set it to true. Do this again when you leave safe area set it to false. Now have a branch in damage, and if 'isSafe is false,then do damage, otherwise don’t do damage.

Oh i see what you mean now. Just remove the damage blueprint and have it as Event begin play in the level blueprint unless i’m in the safebox?

Yes pretty much.

Yeah thanks that worked. I didn’t think about just having the whole area damage :frowning: