• 🏆 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!

[Solved] Unit have do not attack, when they have to

Status
Not open for further replies.
Level 9
Joined
Dec 31, 2016
Messages
316
Here, are my two triggers and attached replays, the problem is, that the units send via unit group attack order do not attack! They have neither invulnerability nor pause, so I do not understand, where is the issue. Can you help me, please?

The second replay shows, that they attack, when they are attacked, so that proof they can attack.

The replays contain some texts in my language, just ignore it. :D

  • Bitva do bitvy
    • Events
      • Time - Bitva_odpocet expires
    • Conditions
    • Actions
      • Countdown Timer - Destroy Bitva_okno
      • Set Urcovac_hrace = (Urcovac_hrace + 2)
        • Do Multiple ActionsFor each (Integer A) from Urcovac_hrace to (Urcovac_hrace + 1), do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Urcovac_hrace Equal to (==) (Integer A)
              • Then - Actions
                • Set Bitva_skupina = (Units in Bitva_staveni[(Integer A)])
                • Unit Group - Pick every unit in Bitva_skupina and do (Actions)
                  • Loop - Actions
                    • Set Bitva_cel[1] = (Position of (Picked unit))
                    • Set Bitva_cel[2] = (Center of Bitva_staveni[(Integer A)])
                    • Set x = ((X of Bitva_cel[1]) - (X of Bitva_cel[2]))
                    • Set y = ((Y of Bitva_cel[1]) - (Y of Bitva_cel[2]))
                    • Set Bitva_cel[3] = (Center of Bitva levy <gen>)
                    • Set Bitva_cel[4] = (Bitva_cel[3] offset by (x, y))
                    • Set Bitva_hrac[1] = (Player((Integer A)))
                    • Player - Make Player 10 (Light Blue) treat (Player((Integer A))) as an Ally
                    • Player - Make (Player((Integer A))) treat Player 10 (Light Blue) as an Ally
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is A peon-type unit) Equal to (==) False
                        • Then - Actions
                          • Unit - Create 1 (Unit-type of (Picked unit)) for (Player((Integer A))) at Bitva_cel[4] facing 0.00 degrees
                          • Unit - Change ownership of (Last created unit) to Player 10 (Light Blue) and Retain color
                        • Else - Actions
                    • Unit Group - Remove all units from Bitva_skupina
              • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Urcovac_hrace + 1) Equal to (==) (Integer A)
              • Then - Actions
                • Set Bitva_skupina = (Units in Bitva_staveni[(Integer A)])
                • Unit Group - Pick every unit in Bitva_skupina and do (Actions)
                  • Loop - Actions
                    • Set Bitva_cel[1] = (Position of (Picked unit))
                    • Set Bitva_cel[2] = (Center of Bitva_staveni[(Integer A)])
                    • Set x = ((X of Bitva_cel[1]) - (X of Bitva_cel[2]))
                    • Set y = ((Y of Bitva_cel[1]) - (Y of Bitva_cel[2]))
                    • Set Bitva_cel[3] = (Center of Bitva pravy <gen>)
                    • Set Bitva_cel[4] = (Bitva_cel[3] offset by (x, y))
                    • Set Bitva_hrac[2] = (Player((Integer A)))
                    • Player - Make Player 1 (Red) treat (Player((Integer A))) as an Ally
                    • Player - Make (Player((Integer A))) treat Player 1 (Red) as an Ally
                      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is A peon-type unit) Equal to (==) False
                        • Then - Actions
                          • Unit - Create 1 (Unit-type of (Picked unit)) for (Player((Integer A))) at Bitva_cel[4] facing 180.00 degrees
                          • Unit - Change ownership of (Last created unit) to Player 1 (Red) and Retain color
                        • Else - Actions
                    • Unit Group - Remove all units from Bitva_skupina
              • Else - Actions
      • Set Bitva_skupina_prava = (Units in Bitva pravy <gen>)
      • Set Bitva_skupina_leva = (Units in Bitva levy <gen>)
        • Do Multiple ActionsFor each (Integer A) from 2 to 9, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Bitva_poprve Equal to (==) True
              • Then - Actions
                • Visibility - Create an initially Enabled visibility modifier for (Player((Integer A))) emitting Visibility across Viditelnost bitva <gen>
              • Else - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Integer A) Equal to (==) 9
              • Then - Actions
                • Set Bitva_poprve = False
              • Else - Actions
            • Camera - Pan camera for (Player((Integer A))) to (Center of Viditelnost bitva <gen>) over 0.00 seconds
      • Trigger - Run Bitva zacina <gen> (checking conditions)
  • Bitva zacina
    • Events
    • Conditions
    • Actions
      • Wait 1.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: PĹ™ipravte se!
      • Wait 1.00 seconds
      • Game - Display to (All players) for 1.00 seconds the text: 3
      • Sound - Play BattleNetTick <gen>
      • Wait 0.50 seconds
      • Game - Display to (All players) for 1.00 seconds the text: 2
      • Sound - Play BattleNetTick <gen>
      • Wait 0.50 seconds
      • Game - Display to (All players) for 1.00 seconds the text: 1
      • Sound - Play BattleNetTick <gen>
      • Wait 0.50 seconds
      • Game - Display to (All players) for 3.00 seconds the text: Do bitvy!
      • Unit Group - Pick every unit in Bitva_skupina_prava and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Bitva levy <gen>)
      • Unit Group - Pick every unit in Bitva_skupina_leva and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Center of Bitva pravy <gen>)
 

Attachments

  • WTF is happening.w3g
    3.5 KB · Views: 26
  • they attack, when they are attacked.w3g
    3.9 KB · Views: 26
Last edited:
Level 9
Joined
Dec 31, 2016
Messages
316
LOL, I just found, that it is caused by the rows:
Unit - Change ownership of (Last created unit) to Player 1 (Red) and Retain color
Unit - Change ownership of (Last created unit) to Player 10 (Light Blue) and Retain color

I do not know why, and what is going on, but when I removed this, it worked as it has.
 
Status
Not open for further replies.
Top