Online gameplay, Learning Blueprint, problem

Hi all,

I try to learn blueprint editor by creating a gameplay asset for multiplayer gaming.
This asset is a flag checkpoint. One team must capture this checkpoint whereas the other team must be defend this flag.

Once the attacker team touch the flag the defender team must re-touch the flag before 10 seconds (or x seconds) otherwise the flag is captured. If the defender team touch before x seconds the flag state come back to idle.

I try to do this by event node. I don’t know if i am right. I have a problem when the timer is activate. How to stop the timer and back to initial state of the flag?

This is how i test. I start the game and i see the flag waving and the light is green. Then i activate the flag when i enter in it (trigger). the light turn yellow for x seconds. Then the light turn red cause the flag is captured.
When the light is yellow, at this step the defender should touch the flag for the light turn green. etc etc… (this part i dont know how to do it)

I hope your understand the process :slight_smile:

Hello,
maybe a loop and delay can replace that and works fine.

with an int variable “time” with 0 as default and a bool " touched again" set to true when a defender comes back.
when event overlap then delay 1s / int = int + 1 then check bool : false : loop true : exit and reset “time” and “touched again”
when time = 10 : captured.

Thank you,

You advice is nice, you gave me an idea with the bool variable. I don’t use the loop with the incremental variable. I still use the ‘set timer’ node with a ‘branch’ node.

It works well.