For what you want to do, switches are not needed:
– Conditions:
Always.
– Actions:
Modify death count for player (not in use on map): add 1 (a particular unit).
Preserve trigger.
– Conditions:
Player (who owns Power Generator) owns exactly 1 (or at least 1) Power Generator.
Player (not in use on map) has suffered at least 5 deaths of (a particular unit).
– Actions:
Modify death count for player (not in use on map): set to 0 (a particular unit).
Set resources for player (who owns Power Generator): add x gas.
Preserve trigger.
That’s more reliable than using the wait trigger. That’s also based on the triggers being run every 2 game seconds (i.e. every 2 game seconds, the death count is increased by 1, so every 10 seconds, while the Power Generator is still alive, the gas is added).
The reason for “at least” 5 deaths instead of “exactly” is just in case something happens and the trigger doesn’t activate at “exactly” 5 deaths.
It could be done with switches:
– Conditions:
Switch (number or name) is set.
– Actions:
Modify death count for player (not in use on map): add 1 (a particular unit).
Preserve trigger.
– Conditions:
Player (not in use on map) has suffered at least 5 deaths of (a particular unit).
– Actions:
Modify death count for player (not in use on map): set to 0 (a particular unit).
Clear switch (number or name).
Preserve trigger.
– Conditions:
Player (who owns Power Generator) owns exactly 1 (or at least 1) Power Generator.
Switch (number or name) is cleared.
– Actions:
Set resources for player (who owns Power Generator): add x gas.
Set switch (number or name).
Preserve trigger.
But why use 3 triggers when it can be done in 2?
Personally, I only really use switches for when multiple things need doing. For example:
– Objectives:
Destroy Stasis Cell.
Destroy Power Generator.
Protect Temple.
Always --> Clear switches 1, 2, 3.
Player (enemy) suffers at least 1 death of Stasis Cell --> Set switch 1.
Player (enemy) suffers at least 1 death of Power Generator --> Set switch 2.
Player (human) suffers at least 1 death of Temple --> Set switch 3.
Switches 1, 2 are set; Switch 3 is cleared --> Victory