trigger problem

zyzfcs

New Member
Reaction score
5
it's really simple ...but it dosen't work...........leak.........? :nuts:

Code:
Untitled Trigger 001
Events
    Time - Every 2.00 seconds of game time
Conditions
Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Number of units in (Units in (Playable map area) owned by Player 2 (Blue))) Equal to 0
        Then - Actions
            Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        Else - Actions
            Do nothing
 

MrApples

Ultra Cool Member
Reaction score
78
Is this what you want? If you dont use units killing eachother, or lots of units are dying every second, replace A Unit Die with Every 2 Seconds.
Code:
Blue Defeat
    Events
        Unit - A unit Dies
    Conditions
       (Owner of (Dying unit)) Equal to Player 2 (Blue)
    Actions
        Set TempUnitGroup = (Units owned by Player 2 (Blue) matching (((Matching unit) is alive) Equal to True))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in TempUnitGroup) Equal to 0
            Then - Actions
                Game - Victory Player 1 (Red) (Show dialogs, Show scores)
                Game - Defeat Player 2 (Blue) with the message: Defeat!
            Else - Actions
                Do nothing
        Custom script:   call DestroyGroup(udg_TempUnitGroup)
 

zyzfcs

New Member
Reaction score
5
i like ur code, ty

just 1 question


Code:
Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Game - Defeat Player 2 (Blue) with the message: Defeat!

should they be reversed? :nuts:
 

SilverHawk

General Iroh - Dragon of the West
Reaction score
89
No. His trigger checks to make sure that Player 2 has 0 units alive, so it's fine.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top