• 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.

Apply Upgrades in a Pick Players Group?

Level 21
Joined
Mar 16, 2008
Messages
965
Is there anything blatantly wrong about this trigger? It seems to be working inconsistently and I'm not sure why. Players 1, 2, 3, 4 seem to consistently get the upgrade. Players 13, 14, 15, 16 do not. Sometimes players 13 and 16 get it, next time players 13 and 14. Is this a situation that needs a Wait?

  • Insane Cheats
    • Events
      • Player - Player 23 (Emerald) types a chat message containing run as An exact match
      • Time - Elapsed game time is 305.00 seconds
    • Conditions
      • insane_king Equal to True
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: Insane King has act...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • insane_cheats[1] Equal to True
        • Then - Actions
          • Player Group - Pick every player in Groups[1] and do (Actions)
            • Loop - Actions
              • Player - Set the current research level of Royal Weapons to 20 for (Picked player)
              • Player - Set the current research level of Royal Armor to 20 for (Picked player)
              • Player - Set the current research level of Sorcery Upgrade to 3 for (Picked player)
              • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1 for (Picked player)
              • Player - Set the current research level of Activate Royal Mage Tower to 1 for (Picked player)
          • Set VariableSet Research_Red_Extra[1] = True
          • -------- Royal Court Mage RED --------
          • Special Effect - Destroy royal_ct_sfx_red
          • Unit - Make Royal Mage Tower 1570 <gen> Vulnerable
          • Unit - Change ownership of Royal Mage Tower 1570 <gen> to Player 13 (Maroon) and Change color
          • Unit - Order Royal Mage Tower 1570 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1570 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1570 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1570 <gen> to train/upgrade to a Royal Court Mage
          • Trigger - Turn on royal ct mage dies red <gen>
          • Trigger - Turn on royal court trained red <gen>
          • Trigger - Turn on royal ct destroyed red <gen>
          • Trigger - Turn off court_mage_triggers[1]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • insane_cheats[2] Equal to True
        • Then - Actions
          • Player Group - Pick every player in Groups[2] and do (Actions)
            • Loop - Actions
              • Player - Set the current research level of Royal Weapons to 20 for (Picked player)
              • Player - Set the current research level of Royal Armor to 20 for (Picked player)
              • Player - Set the current research level of Sorcery Upgrade to 3 for (Picked player)
              • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1 for (Picked player)
              • Player - Set the current research level of Activate Royal Mage Tower to 1 for (Picked player)
          • Set VariableSet Research_Blue_Extra[1] = True
          • -------- Royal Court Mage BLUE --------
          • Special Effect - Destroy royal_ct_sfx_blue
          • Unit - Make Royal Mage Tower 1567 <gen> Vulnerable
          • Unit - Change ownership of Royal Mage Tower 1567 <gen> to Player 14 (Navy) and Change color
          • Unit - Order Royal Mage Tower 1567 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1567 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1567 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1567 <gen> to train/upgrade to a Royal Court Mage
          • Trigger - Turn on royal ct mage dies blue <gen>
          • Trigger - Turn on royal court trained blue <gen>
          • Trigger - Turn on royal ct destroyed blue <gen>
          • Trigger - Turn off court_mage_triggers[2]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • insane_cheats[3] Equal to True
        • Then - Actions
          • Player Group - Pick every player in Groups[3] and do (Actions)
            • Loop - Actions
              • Player - Set the current research level of Royal Weapons to 20 for (Picked player)
              • Player - Set the current research level of Royal Armor to 20 for (Picked player)
              • Player - Set the current research level of Sorcery Upgrade to 3 for (Picked player)
              • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1 for (Picked player)
              • Player - Set the current research level of Activate Royal Mage Tower to 1 for (Picked player)
          • Set VariableSet Research_Teal_Extra[1] = True
          • -------- Royal Court Mage TEAL --------
          • Special Effect - Destroy royal_ct_sfx_teal
          • Unit - Make Royal Mage Tower 1565 <gen> Vulnerable
          • Unit - Change ownership of Royal Mage Tower 1565 <gen> to Player 15 (Turquoise) and Change color
          • Unit - Order Royal Mage Tower 1565 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1565 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1565 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1565 <gen> to train/upgrade to a Royal Court Mage
          • Trigger - Turn on royal ct mage dies teal <gen>
          • Trigger - Turn on royal court trained teal <gen>
          • Trigger - Turn on royal ct destroyed teal <gen>
          • Trigger - Turn off court_mage_triggers[3]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • insane_cheats[4] Equal to True
        • Then - Actions
          • Player Group - Pick every player in Groups[4] and do (Actions)
            • Loop - Actions
              • Player - Set the current research level of Royal Weapons to 20 for (Picked player)
              • Player - Set the current research level of Royal Armor to 20 for (Picked player)
              • Player - Set the current research level of Sorcery Upgrade to 3 for (Picked player)
              • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1 for (Picked player)
              • Player - Set the current research level of Activate Royal Mage Tower to 1 for (Picked player)
          • Set VariableSet Research_Purp_Extra[1] = True
          • -------- Royal Court Mage PURPLE --------
          • Special Effect - Destroy royal_ct_sfx_purp
          • Unit - Make Royal Mage Tower 1564 <gen> Vulnerable
          • Unit - Change ownership of Royal Mage Tower 1564 <gen> to Player 16 (Violet) and Change color
          • Unit - Order Royal Mage Tower 1564 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1564 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1564 <gen> to train/upgrade to a Royal Court Mage
          • Unit - Order Royal Mage Tower 1564 <gen> to train/upgrade to a Royal Court Mage
          • Trigger - Turn on royal ct mage dies purp <gen>
          • Trigger - Turn on royal court trained purp <gen>
          • Trigger - Turn on royal ct destroyed purp <gen>
          • Trigger - Turn off court_mage_triggers[4]
        • Else - Actions
  • TEST a
    • Events
      • Player - Player 23 (Emerald) types a chat message containing level as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Current research level of Royal Weapons for Player 13 (Maroon))))
      • Game - Display to (All players) the text: (String((Current research level of Royal Weapons for Player 14 (Navy))))
      • Game - Display to (All players) the text: (String((Current research level of Royal Weapons for Player 15 (Turquoise))))
      • Game - Display to (All players) the text: (String((Current research level of Royal Weapons for Player 16 (Violet))))
  • TEST b
    • Events
      • Player - Player 23 (Emerald) types a chat message containing group as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Number of players in Groups[1])))
      • Game - Display to (All players) the text: (String((Number of players in Groups[2])))
      • Game - Display to (All players) the text: (String((Number of players in Groups[3])))
      • Game - Display to (All players) the text: (String((Number of players in Groups[4])))
level
1746693396562.png


group
1746693437799.png

Very confused why the upgrades aren't being applied. If I spam the trigger by debug command "run" it seems everyone gets it:
1746693511979.png

So the group variable is working and set. But something seems to be wrong with the applying upgrades this way. Any ideas?

If you spam the trigger with debug command then it gets applied to everyone.

I also tried separating into multiple pick player loops.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • insane_cheats[1] Equal to True
    • Then - Actions
      • Player Group - Pick every player in Groups[1] and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Royal Weapons to 20 for (Picked player)
      • Player Group - Pick every player in Groups[1] and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Royal Armor to 20 for (Picked player)
      • Player Group - Pick every player in Groups[1] and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Sorcery Upgrade to 3 for (Picked player)
      • Player Group - Pick every player in Groups[1] and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1 for (Picked player)
      • Player Group - Pick every player in Groups[1] and do (Actions)
        • Loop - Actions
          • Player - Set the current research level of Activate Royal Mage Tower to 1 for (Picked player)
  • ...

Still doesn't apply the upgrades unless the trigger is manually spammed by typing "run".
 
Last edited:
Level 12
Joined
Nov 13, 2010
Messages
278
try add Wait 0.10 seconds before upgrades to see if that works

we can try somthing els if dont work you can try this. edit the arrays you make need to be 4 or depahps on how many players there can play ofc
  • Insane Cheats
    • Events
      • Player - Player 23 (Emerald) types a chat message containing run as An exact match
      • Time - Elapsed game time is 305.00 seconds
    • Conditions
      • insane_king Equal to True
    • Actions
      • For each (Integer A from 1 to 4), do (Actions)
        • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • insane_cheats[Integer A] Equal to True
          • Then (Actions)
            • Player Group - Pick every player in Groups[Integer A] and do (Actions)
              • Loop - Actions
                • Player - Set the current research level of Royal Weapons to 20
                • Player - Set the current research level of Royal Armor to 20
                • Player - Set the current research level of Sorcery Upgrade to 3
                • Player - Set the current research level of Upgrade Forces: Royal Exemplar XL (dota) to 1
                • Player - Set the current research level of Activate Royal Mage Tower to 1
          • Set VariableSet Research_+[Integer A] = True ( this is a Boolean flags )
          • Special Effect - Destroy (make your sfx array)[Integer A]
          • Unit - Make Royal Mage Tower (make a array tower id here) [Integer A] Vulnerable
          • Unit - Change ownership of Royal Mage Tower (that tower id gos here)[Integer A] to Player (make a player color array here)[Integer A]
          • Unit - Order Royal Mage Tower (that tower id gos here)[Integer A] to train/upgrade to a Royal Court Mage (x4)
          • Trigger - Turn on royal ct mage dies purp[Integer A]
          • Trigger - Turn on royal court trained purp[Integer A]
          • Trigger - Turn on royal ct destroyed purp[Integer A]
          • Trigger - Turn off court_mage_triggers[Integer A]
 
Last edited:
Top