• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Summoning units problems

Status
Not open for further replies.
Level 6
Joined
Jan 29, 2010
Messages
213
Hi, all again. I have some problem with trigger, or sumoning unit (infernal):

Defeat
  • defeat
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of units in (Units in (Playable map area) owned by Player 1 (Red))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 2 (Blue))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 3 (Teal))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 4 (Purple))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 5 (Yellow))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 6 (Orange))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 7 (Green))) Equal to 0
      • (Number of units in (Units in (Playable map area) owned by Player 8 (Pink))) Equal to 0
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
      • Game - Defeat Player 3 (Teal) with the message: Defeat!
      • Game - Defeat Player 4 (Purple) with the message: Defeat!
      • Game - Defeat Player 5 (Yellow) with the message: Defeat!
      • Game - Defeat Player 6 (Orange) with the message: Defeat!
      • Game - Defeat Player 7 (Green) with the message: Defeat!
      • Game - Defeat Player 8 (Pink) with the message: Defeat!

If all Heroes dies owned by players(1-8) than game will end, but If mage summons Infernals, and after that all Heroes dies, it gets bugged no matter if infernals dies the game will not end. (if infernals dies before Heroes then game will end)
So what's with infernals wrong what I have to change to get this trigger working for me :/
 
Last edited:
Level 20
Joined
Jul 6, 2009
Messages
1,885
  • Defeat
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((Player number of (Owner of (Matching unit))) Less than or equal to 8)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • For each (Integer LoopInteger) from 1 to 8, do (Actions)
            • Loop - Actions
              • Game - Defeat (Player(LoopInteger)) with the message: Defeat!
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
This should work.
 
Level 6
Joined
Jan 29, 2010
Messages
213
  • Defeat
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and ((Player number of (Owner of (Matching unit))) Less than or equal to 8)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in TempGroup) Equal to 0
        • Then - Actions
          • For each (Integer LoopInteger) from 1 to 8, do (Actions)
            • Loop - Actions
              • Game - Defeat (Player(LoopInteger)) with the message: Defeat!
        • Else - Actions
      • Custom script: call DestroyGroup(udg_TempGroup)
This should work.

U see ther's not here problem when all heroes dies game ends (it's ok), but If I summon Infernal all heroes dies and infernal left alive, than game will never end (even the summoned unit has a time limit before it dies).
 
Level 6
Joined
Jan 29, 2010
Messages
213
It won't work becouse of:
Player number of (Owner of (Matching unit))) Less than or equal to 8

Imagine... There's 3 players in game - player1(red), playe4(purple), player8(pink)
So the player numer will be:
player numer = 1+4+8
player numer = 13

:(
 
Status
Not open for further replies.
Top