Trigger that happens when all are dead?

YaY_simulato

New Member
Reaction score
4
Heya! How do i great an trigger which occures when all units owned by a certain player in a region are dead? I think i could make the part what happens when all units are dead, but i have no idea how to make a trigger that has an event or something that check when all those units owned by a certain player are dead... Was i too complicated? :eek:

Thanks for help in advantage!
 

Notti

New Member
Reaction score
1
Event: A unit dies
Condition: Integer comparison > Number of units in region owned by player(owner of triggering unit) equals to 0
Actions: whatever
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Trigger:
  • Actions
    • Set Temp_Group = (Units in (Region XXX) owned by Player X (YYY)) [Units in Region owned by Player]
    • If/ Then/ Else
      • If (Conditions)
        • (Units in (Temp_Group) are dead) Equal to True [boolean comparison]
      • Then
        • Do actions
    • Custom script: call DestroyGroup (udg_Temp_Group)
 

YaY_simulato

New Member
Reaction score
4
Ok, thanks alot both of you, i think i got it working ^^
Im afraid i odnt have time to test it, but it seems to be ok.
 

YaY_simulato

New Member
Reaction score
4
ok, i made it like this:

Code:
Fields Dead
    Events
    Conditions
    Actions
        Set Fields_Group = (Units in Fields <gen> owned by Player 12 (Brown))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (All units of Fields_Group are dead) Equal to True
            Then - Actions
                Game - Display to (All players) the text: Oh blast it! All of...
                Cinematic - Send transmission to (All players) from RunawayRifleman named Rifleman: Play No sound and display lol.  Modify duration: Add 0.00 seconds and Wait
                Trigger - Turn on Create Plague Lord <gen>
            Else - Actions
                Do nothing
        Custom script:   call DestroyGroup (udg_Fields_Group)

but it aint working :( I tried to seek for the pharaoh action wheres no Else - Actions spot, but i couldnt find it :eek: (As you can seem, im not realy good in triggering yet hehe..)
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
Where is the event smartie? :p
Event is when the trigger will fire; you need an event to get it working, e.g. when a unit enters a region/ when a unit casts an ability. So, when do you want this trigger to fire?
 
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