Triggering progress bar


Uhm, I’m having a hard time to learn casting and came up with this method of way to cast. So when the character step on a trigger a progress bar will appear and depletes over time. My problem is when I duplicate the trigger the progress bar continues to deplete instead of starting over again when I step on the new trigger. Any help would be gladly appreciated.

VIDEO: >>>> Go6m7y is an Animated GIF Image on Make a GIF <<<<

The action of casting is merely defining the class that you’re expecting a specific object to be. In your case, your cast makes sure that your “Other Actor” must be of type “TopDownCharacter” in order to continue the functionality.

The problem lays with where your “Checking time” is set. At no point in time in your logic do you ever reset it to max.

It doesn’t matter how many trigger boxes you have, it will always continue from the last thing that you set it to.

Now, I have no clue what you want your logic to become, or how it should behave. I can only assume that you want the bar to start from full every time you step on a different one. The best way to go about this problem would be to make sure the time is part of the BPActor_Building_Base instead of your topdowncharacter. And set the bases as references in the player.

Still, you can somewhat make it work with your current setup. Just make sure that your “OnEndOverlap” sets the “CheckingTime” in your CharacterReference back to the CheckingTimeMax.