A winning structure - like "wonder" from AoE

Hello folks.

ive built a pvp game and im almost done. Have 1 more thing that i cant understand.

I have an “item / structure” in my game that you have to craft and build in order to win. That’s the whole concept of the game. Craft this “wonder” (refering to the ones in Age Of Empires) and after a certain time you win the game.

So far ive created the wonder, i can place it and the timer starts - when the timer hits 0 i win the game! woho… !

BUT… if the wonder gets destroyed by other players the timer still counts…

Any clues or suggestion how you guys would have done? Hope you understand, thanks in advance! :slight_smile:

In blueprints, there is an event called “Event Destroyed”. It executes when the actor gets destroyed. Put logic for resetting the timer in this event. If you are implementing the timer using “Set timer by event/function name”, you can use “clear and invalidate timer” node to stop the timer.