I am planning to have something like a poison gas surrounding a mesh. So i created a box and have it as a child of the mesh.
I then setup the onbeginoverlap and the necessary nodes but it does not work. Already have the overlap settings in the box and mesh to true. It is the same graph i used on an object but when i tried the graph on an object, the overlap works.
So anyone can help me or maybe give me an example of a simple graph where the player enter the box with gas, has his stamina reduced the longer he stays there.
Hi man , on begin overlap , its an event that occur just one time, when you enter the trigger.
once you are in there the event does not fire enymore, unitl you exit, then he cast, on end overlap.
There are several ways to to this , that all occur to different problem , here a working example,
you can set a variable to the char/enemy/player who enter in the trigger, using the cast to method.
So in the Char/enemy/player you can check at every thick , if you are in the damage area.
if yes , you just detract the right damage of life, or stamina in your case.
Its pretty simple,
you can also create a custom event, like, FIREevent or FOG event.
that check your variable , and then reduce your life , your breath or your stamina.
Basically, add a Collision Component to your gas cloud object. Also add a variable to keep track of which character is currently inside the cloud. When the player enters the cloud, set the variable to the player. When he leaves, reset it to None.
What Cast to PlayerController node? I didn’t use the controller in my solution. You need to cast to your character Blueprint because only actors of that time will have stamina that can be reduced.