I've been playing around with the editors and I got stuck on something, let me lay out what I have:
It's basic scenario where the player is in a defensive position and I generate zergs to come at him in waves. Now what I want to do, is if the player can manage to destroy a structure that belongs to the zerg player, then the waves should stop.
I'm stuck on that little logic
In the triggers editor, I have
in the left pane
>Melee init< which contains the basic setup for allies and the default melee init
>Attack Waves< This is where I gen the waves
Events
+ Timer - Every (Random real between 10.0 and 20.0) seconds of Game Time
Local variables
+ x = 0.0 <Real>
+ Bugs = (Empty unit group) <Unit Group>
Actions:
+ General - If (Conditions) then do (Actions) else do (Actions)
++ General - For each real x from 1.0 to (Random real between 25.0 and 40.0) with increment 1.0, do (Actions)
+++ Actions
++++ Unit - Create 1 Zergling for player 2 at Point 001 using default facing (No Options)
+++++ Unit - Create 1 Zergling for player 2 at Point 001 using default facing (No Options)
+ Unit - Order all units in Bugs to ( Attack targeting Point 002) (After Existing Orders)
So this works well, they keep coming and coming

I've tried playing around with the IF THEN ELSE and the WHILE loops but I can't get any to work.
Say I assign the zerg to player 9, and I build a hatchery for him.
How do I say, if Player 1 kills <player 9 hatchery> then stop the waves.
I've tried wrapping the "waves" actions with an if statement that monitors a Unit Dies, the setting a new variable to 1 but I can't seem to get the logic in the right place.
Any advice?
Cheers
None.




