Gastouuu
(Gastou)
August 3, 2023, 12:03pm
1
Hello guys,
I’m new to UE and I coded a simple timer for my game
The timer starts when the player crosses a hit box and stops when he crosses another hit box
The issue is that the timer stops at a precise position in my level where there is no hit box
I would really appreciate any help, thank you
Try checking the overlap is actually with the player, using a cast. Otherwise it could be anything overlapping the box
How do you know the timer is paused?
1 Like
Everynone
(Everynone)
August 3, 2023, 12:47pm
3
The timer makes no sense:
No need to do any of this - timers already count all the time you need.
The first timer is the time that is passing, the second one reads the first. You can format the output manually if needed.
You can, technically, skip the 2nd timer and read the 1st timer’s elapsed whenever, even on tick.
1 Like
Gastouuu
(Gastou)
August 3, 2023, 12:48pm
4
You’re right, it wasn’t cast to the character, I did it and it works
I think the problem comes from world partition, because when I disabled world partition it worked too
I think it’s the loading of the map with world partition that overlaps the hit box
Thanks you for your help!
1 Like
EdenEskay
(Eden Eskay)
August 3, 2023, 12:51pm
5
What you can do is before casting to the game mode to access the timer function, first cast to the actor that should overlap the box before before the timer starts,
and for the actors object wildcard connect it to the other actor in the overlap event node. This will make to check if its actually your player overlapping before it starts and stops the timer. Hope this helps
1 Like
Gastouuu
(Gastou)
August 3, 2023, 12:57pm
6
Thank you guys for all your help!
I try to learn everyday about UE and this forum helps me a lot
Problem solved