• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Help with EndFight System

Status
Not open for further replies.
Level 4
Joined
Apr 30, 2007
Messages
62
I want if 0 units of neutral enemy are left that all heros get teleported back

  • FightEnde
    • Ereignisse
      • Zeit - Every 1.00 seconds of game time
    • Bedingungen
      • InFight Gleich False
    • Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • And - All (Conditions) are true
            • Bedingungen
              • (Number of units in (Units in A Arena ALL <gen> owned by Neutral feindlich)) Gleich 0
              • (Number of units in (Units in A Arena ALL <gen> matching (((Matching unit) is Ein Held) Gleich True))) Größer gleich 1
        • 'THEN'-Aktionen
          • -------- gold xp items geben --------
          • -------- ende --------
          • Einheitengruppe - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is Ein Held) Gleich True)) and do (Actions)
            • Schleifen - Aktionen
              • Einheit - Move (Picked unit) instantly to (Random point in Inventar <gen>)
          • Einheit - Move A_Leader instantly to A_LeaderPoint
          • Set InFight = False
        • 'ELSE'-Aktionen
my trigger works if i remove the condition " units of enemy of neutral enemys in region gleich X " but i need some condition or else all heroes get ported the whole time
 
Level 7
Joined
Nov 19, 2007
Messages
253
I think this could work
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Owner of (Dying unit)) Equal to Neutral Hostile
          • (Number of units in (Units in (Playable map area) owned by Neutral Hostile)) Equal to 0
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of (Playable map area))
      • Set Unit_Group_Players = (Last created unit group)
      • Custom script: call DestroyGroup (udg_Unit_Group_Players)
 
Status
Not open for further replies.
Top