A switch is a simple on/off value. Basically, you can setup defense triggers like this (this is as an example for levels4-5):
| Trigger |
| Description: |
| Level 4 |
|
| Players: |
| ¤ A single computer player |
| Conditions: |
¤ Switch 3 is set
|
| ¤ Other conditions |
| Actions: |
¤ Create N Unit X at 'Y'
|
¤ {Repeat as needed}
|
| ¤ Set Switch 4 |
| Trigger |
| Description: |
| Level 4 |
|
| Players: |
| ¤ A single computer player |
| Conditions: |
¤ Switch 4 is set
|
| ¤ Other conditions |
| Actions: |
¤ Create N Unit Z at 'Y'
|
¤ {Repeat as needed}
|
| ¤ Set Switch 5 |
Notice how after Level 4 ran, Switch 4 was set. A switch can be either Set or Clear, and they have no direct effects in-game (only as trigger actions or conditions). You can set conditons for a given switch's state, or you can set actions to clear, toggle, set, or even randomize switches.