How can I make an event happen randomly

Place an actor with a volume. When the player enters the volume start checking if there is an attack. You can hook up what I posted to a timer, as suggested.

Or have a safe zone (an actor with a volume) switch it off when entered.