"Wonder" from AoE?

Hello.

I have a question about creating a blueprint of an item that acts like a wonder from Age Of Empires.

Okey, so i have almost completed my game but i cant figure this one out…

Long story short - its a game and to win you have to collect resorces and build a structure (wonder) and hold it alive for a certan time.

So far i have the structure, i can craft it, place it and the timer starts. When the timer is on 0 i win! Woho!

BUT! - If the item gets destroyed during the timer it still going down… i dont know if i shall do a check like every second after the wonder or when it gets destoryed remove the timer?

Hope you understand what i mean. Thanks in advance!

If you create a Timer by using a Set Timer node, it outputs a timer reference object (dark blue pin) that you can store in a variable.
Later when you need it to cancel the timer like if the building is destroyed, then you can use that variable to stop, invalidate, or pause the timer.

How are you doing the timer? Are you using a Set Timer node or a Delay or setting a timestamp and comparing it every tick or what?

Hello, thanks for answer!

Im using a Timer. I will look into that… Because right now, when you place down the “wonder” a timer starts, and i manage to kill the timer if the wonder is destroyed. The problem is if 2 people have one each… because if i kill one wonder both timer dies… -.-

I think i got it! Thanks for the help. Found that “timer handle” and just call “Clear and Invalidate Timer By Handle” . Works fine so far!