customised timer function

Hello guys, I am trying to create a timer (you die/respawn when timer ends) which is displayed as a widget. The timer seems to work fine but I have another BP, which is a checkpoint (Checkpoint posted by anonymous | blueprintUE | PasteBin For Unreal Engine) and what I am trying to do is that when the player approaches these checkpoints, the timer replenishes by pressing a button also timer is frozen while he is around (on begin overlap?)If someone with experience could give me ideas on how to think of this I would really appreciate it as I am a bit lost. Thank you for your time and help!

Your idea sounds correct. Pause timer on overlap, resume once left, reset on button push. Maybe I misunderstood what you wanted to do but that sounds good.

no that is correct but how can I actually call it in the BP? Let me explain properly, please.
The idea is you get to the checkpoint (BP1) and as you said the timer is frozen (stop) and also the minutes and seconds are set back to the initial level. Once when you are away the timer starts counting again, all this logic is implemented in my character BP (BP2, screenshot above) but how can I get this event from BP2 into BP1? I understand I need to call/cast it but every time I do these I get errors.

If the logic is in your Character BP, can’t you just call it through an interface function call from whichever checkpoint, such as an event when player enters, and when player leaves? For example, on begin overlap and on end overlap will have a pawn input on those events, then you can just call to that pawn (your character) and send in the checkpoint (actor) reference the character is interacting with. Then the character BP will now have access to this checkpoint reference from within its blueprint.

1 Like

thanks for your help, I actually casted instead of using interface (never used it) and right now works!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.