How to add a box that affect character settings?

I would like to implement an area that when character walks inside its range, it would be allowed to use certain functionality.

Which means, if overlap with the sprite, a variable in character script will change to true so that I could perform certain action (e,g, God mode, HP rege, the access to a certain kind of weapon… I know how to set these up in the character BP but I need a variable to distinguish if it could be called)only in the zone.

Is there a method to do this in blueprint?

Cheers.

this endless runner tutorial shows how to set up a box volume that allows the player to turn:

inside an actor with a box collision component with its collision set to overlap all, and generate overlap events option checked, on begin overlap, cast the other actor to your type of character, and change the boolean to true, and on end overlap, change it back to false.

if you want multiple actors to be affected by overlapping the actor, without casting to each type, you can make a blueprint interface function, which the other actors can implement, then on overlap, you call the interface function on the Other Actor, without any need for type casting.

Hey that was really helpful. Thanks a lot, but what if I would like to put an icon (sprite) at the point to inform player and remove the sprite after player get in the box (i.e. make it not reusable)?

Box Trigger can’t contain sprites so I guess I have to create a sprite at the same point as the box trigger and while

Begin Overlap → cast to Character → set bool → delete component (sprite?)

How could I actually “assign” it to destroy the sprite? :open_mouth:

just make an actor with a box component, then add a sprite component, instead of using triggers.

Awesome. that’s definitely a more elegant solution.

All problem solved! Cheers.