I just thought of a way to do if statements using StarCraft triggers. Sorry if this is actually redundant.
Let's say I want a marine to say, "I want a beer" and if and only if player one has 10 minerals, the marine will say, "And a hooker too." Here is some pseudocode to for that trigger:
CODE
CONDITION:
- Player 1 Brings at least 1 Terran Marine to Locatoin 'Bar'
ACTION:
- Display Text Message: "MARINE: I want a beer"
- Wait 3000 miliseconds
- Set Switch 1
- Create 1 Vespene Tank for player 7 at 'Bar'
CODE
CONDITION:
- Switch 1 is set
- Player 1 accumulates 10 or more ore
ACTION:
- Display Text Message: "MARINE: And a hooker too."
- Wait 3000 miliseconds
- Create 1 Sarah Kerrigan for player 7 at 'Bar'
- Clear Switch 1
The marine will say the extra line if and only if player 1 has 10 minerals. This is pretty simplifed, but I'm sure you can do more complex things, such as trigger an entire series of events if a "condition" within an action is met.