Ability Cooldown Isn't Working

Level 21
Joined
Mar 16, 2008
Messages
955
Seems this isn't working. All variables are set. Knight Altar is unit variable array. Kingdom join CD is a real variable set to 240. Any idea why it's not working?

  • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Red) " over "kingdom_join_CD seconds.
  • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Blue) " over "kingdom_join_CD seconds.
  • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Teal) " over "kingdom_join_CD seconds.
  • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Purp) " over "kingdom_join_CD seconds.
 
Level 24
Joined
Feb 27, 2019
Messages
833
As long as the ability can have a cooldown normally I havnt heard or experienced any issues simply with the function starting cooldown of an ability to start the cooldown. Therefore I believe the problem is not with the function and additional information is required to find the cause of the problem: The trigger and the base ability that is being used should suffice.
 
Level 21
Joined
Mar 16, 2008
Messages
955
Thanks. The actions I posted above are about half way down on "Trigger 2." Kind of a mess but here you go:

1742675731427.png

1742675790982.png

EDIT. Forgot to add this one:
  • Yellow Join by Button
    • Events
      • Unit - Altar of Knights 0352 <gen> Finishes casting an ability
    • Conditions
      • (Unit-type of (Casting unit)) Equal to Altar of Knights
      • (Owner of (Casting unit)) Equal to Player 5 (Yellow)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Pledge Allegiance (Red)
        • Then - Actions
          • Trigger - Run Yellow join Red <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Pledge Allegiance (Blue)
        • Then - Actions
          • Trigger - Run Yellow join Blue <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Pledge Allegiance (Teal)
        • Then - Actions
          • Trigger - Run Yellow join Teal <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to Pledge Allegiance (Purp)
        • Then - Actions
          • Trigger - Run Yellow join Purp <gen> (checking conditions)
        • Else - Actions

  • Yellow join Red
    • Events
      • Player - Player 5 (Yellow) types a chat message containing -join red as An exact match
    • Conditions
      • (King's Castle 0012 <gen> is alive) Equal to True
      • ((This trigger) is on) Equal to True
    • Actions
      • Dialog - Hide dialog_join_05 for Player 1 (Red)
      • Dialog - Hide dialog_join_06 for Player 1 (Red)
      • Dialog - Hide dialog_join_07 for Player 1 (Red)
      • Dialog - Hide dialog_join_08 for Player 1 (Red)
      • Dialog - Hide dialog_join_09 for Player 1 (Red)
      • Dialog - Hide dialog_join_10 for Player 1 (Red)
      • Dialog - Hide dialog_join_11 for Player 1 (Red)
      • Dialog - Hide dialog_join_12 for Player 1 (Red)
      • Dialog - Hide dialog_join_17 for Player 1 (Red)
      • Dialog - Hide dialog_join_18 for Player 1 (Red)
      • Dialog - Hide dialog_join_19 for Player 1 (Red)
      • Dialog - Hide dialog_join_20 for Player 1 (Red)
      • Dialog - Hide Request_Menu[5] for Player 1 (Red)
      • Dialog - Hide Request_Menu[6] for Player 1 (Red)
      • Dialog - Hide Request_Menu[7] for Player 1 (Red)
      • Dialog - Hide Request_Menu[8] for Player 1 (Red)
      • Dialog - Hide Request_Menu[9] for Player 1 (Red)
      • Dialog - Hide Request_Menu[10] for Player 1 (Red)
      • Dialog - Hide Request_Menu[11] for Player 1 (Red)
      • Dialog - Hide Request_Menu[12] for Player 1 (Red)
      • Dialog - Hide Request_Menu[17] for Player 1 (Red)
      • Dialog - Hide Request_Menu[18] for Player 1 (Red)
      • Dialog - Hide Request_Menu[19] for Player 1 (Red)
      • Dialog - Hide Request_Menu[20] for Player 1 (Red)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Unit Inventory (Human, no use items) for Knight_Altar_Var[5]) Equal to 1
        • Then - Actions
        • Else - Actions
          • Unit - Add Unit Inventory (Human, no use items) to Knight_Altar_Var[5]
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current gold) Less than 1000
        • Then - Actions
          • Quest - Display to Solo_Group_Yellow the Mission Failed message: |cffff0000Error|r: ...
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • limits_current_red Greater than or equal to limits_max_knights
        • Then - Actions
          • Quest - Display to Solo_Group_Yellow the Mission Failed message: |cffff0000Error|r: ...
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Yellow_Hero is being transported) Equal to True
        • Then - Actions
          • Quest - Display to Solo_Group_Yellow the Mission Failed message: |cffff0000Error|r: ...
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • ninty_sec_time Equal to False
              • ai_king[1] Equal to True
        • Then - Actions
          • Custom script: call DestroyGroup(udg_Units_Yellow)
          • Set VariableSet Units_Yellow = (Units owned by Player 5 (Yellow).)
          • Unit Group - Pick every unit in Units_Yellow and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Picked unit) has an item of type Midnight Ankh) Equal to True
                      • ((Picked unit) has an item of type Plans: Black Tent) Equal to True
                • Then - Actions
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Black_Group_Var.) Equal to True
            • Then - Actions
              • Item - Pick every item in (Entire map) and do (If (Midnight Ankh Equal to (Item-type of (Picked item))) then do (Item - Remove (Picked item)) else do (Do nothing))
              • Item - Pick every item in (Entire map) and do (If (Plans: Black Tent Equal to (Item-type of (Picked item))) then do (Item - Remove (Picked item)) else do (Do nothing))
            • Else - Actions
          • Set VariableSet Units_Yellow = (Units owned by Player 5 (Yellow) matching (((Matching unit) is alive) Equal to True).)
          • Unit Group - Remove Yellow_Hero from Units_Yellow.
          • Unit Group - Remove Unit_Yellow_Altar from Units_Yellow.
          • Unit Group - Remove pirate_ship_unit[5] from Units_Yellow.
          • Unit Group - Remove pirate_ship_unit[5] from Units_Yellow.
          • Unit Group - Pick every unit in Units_Yellow and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Knight's Vault
                      • (Unit-type of (Picked unit)) Equal to Pack Horse (King Unit)
                      • (Unit-type of (Picked unit)) Equal to Wagon
                      • (Unit-type of (Picked unit)) Equal to Free Knight (merc camp)
                      • (Unit-type of (Picked unit)) Equal to Crusader
                      • (Unit-type of (Picked unit)) Equal to Cleric
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from Units_Yellow.
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group1Red.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 1 (Red) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group2Blue.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 2 (Blue) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group3Teal.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 3 (Teal) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group4Purp.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 4 (Purple) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Black_Group_Var.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 21 (Coal) and Change color)
            • Else - Actions
          • Custom script: call DestroyGroup(udg_Units_Yellow)
          • Set VariableSet Loyalty_Status_Yel = 0
          • Countdown Timer - Pause Loyalty_Timer_Yellow
          • Countdown Timer - Start Loyalty_Timer_Yellow as a Repeating timer that will expire in 660.00 seconds
          • Unit - Remove Hire_Button_Unit_Yellow[1] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[2] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[3] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[4] from the game
          • For each (Integer loop_integer_C) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Remove (Load (Player number of (Triggering player)) of loop_integer_C in hire_buttons_hashtable.) from the game
          • Countdown Timer - Start End_Timer as a One-shot timer that will expire in 0.10 seconds
          • Countdown Timer - Start End_Timer_Camera as a One-shot timer that will expire in 1.00 seconds
          • Trigger - Turn off Yellow Black Altar <gen>
          • Trigger - Turn off Blank Ankh Used Yellow <gen>
          • Countdown Timer - Start Yellow_CD as a One-shot timer that will expire in kingdom_join_CD seconds
          • Hero - Make Player 5 (Yellow) Heroes gain 100.00% experience from future kills
          • Player - Change color of Player 5 (Yellow) to Yellow, Changing color of existing units
          • Player Group - Add Player5Yellow to Group1Red
          • Player Group - Remove Player5Yellow from Group2Blue.
          • Player Group - Remove Player5Yellow from Group3Teal.
          • Player Group - Remove Player5Yellow from Group4Purp.
          • Player Group - Remove Player5Yellow from Group5_NoGroup.
          • Player Group - Remove Player5Yellow from Black_Group_Var.
          • Player Group - Make Group1Red treat Group1Red as an Ally with shared vision
          • Player - Make Player 1 (Red) treat Player 13 (Maroon) as an Ally
          • Player Group - Make Group1Red treat Group2Blue as an Enemy
          • Player Group - Make Group1Red treat Group3Teal as an Enemy
          • Player Group - Make Group1Red treat Group4Purp as an Enemy
          • Player Group - Make Group1Red treat Group5_NoGroup as an Enemy
          • Player Group - Make Group1Red treat Black_Group_Var as an Enemy
          • Player Group - Make Black_Group_Var treat Group1Red as an Enemy
          • Player Group - Make Group2Blue treat Group1Red as an Enemy
          • Player Group - Make Group3Teal treat Group1Red as an Enemy
          • Player Group - Make Group4Purp treat Group1Red as an Enemy
          • Player Group - Make Group5_NoGroup treat Group1Red as an Enemy
          • Player - Make Player 5 (Yellow) treat Player 21 (Coal) as an Enemy
          • Player - Make Player 21 (Coal) treat Player 5 (Yellow) as an Enemy
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Royal Weapons for (Picked player)) Less than (Current research level of Royal Weapons for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Royal Weapons to (Current research level of Royal Weapons for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Royal Armor for (Picked player)) Less than (Current research level of Royal Armor for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Royal Armor to (Current research level of Royal Armor for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Improved Masonry for (Picked player)) Less than (Current research level of Improved Masonry for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Improved Masonry to (Current research level of Improved Masonry for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Black Gunpowder for (Picked player)) Less than (Current research level of Black Gunpowder for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Black Gunpowder to (Current research level of Black Gunpowder for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Animal Breeding for (Picked player)) Less than (Current research level of Animal Breeding for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Animal Breeding to (Current research level of Animal Breeding for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player - Set the current research level of Gluttony to 0 for Player 5 (Yellow)
          • Player - Set Player 5 (Yellow).Food max to 99
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Altar of Knights 0352 <gen> is invulnerable) Equal to False
            • Then - Actions
              • Unit - Add Invulnerable (Neutral) to Altar of Knights 0352 <gen>
            • Else - Actions
          • Set VariableSet altar_point_var_yellow = (Position of Altar of Knights 0352 <gen>)
          • Special Effect - Create a special effect at altar_point_var_yellow using Heavens Gate Channel.mdx
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_altar_point_var_yellow)
          • Special Effect - Create a special effect attached to the origin of Altar of Knights 0352 <gen> using Heavens Gate.mdx
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move Altar of Knights 0352 <gen> instantly to Yellow_Red_Altar
          • Camera - Pan camera for Player 5 (Yellow) to Yellow_Red_Altar over 1.00 seconds
          • Cinematic - Ping minimap for Group1Red at (Center of Red Yellow Altar <gen>) for 5.00 seconds
          • Quest - Display to (All players) the Quest Update message: The |cffffff00Yello...
          • Unit - Order Altar of Knights 0352 <gen> to Revive Hero Yellow_Hero
          • Unit - Change color of Yellow_Hero to Red
          • Unit - Set Unit Skin of Knight_Altar_Var[5] to (Skin ID of Altar of Knights 1689 <gen>)
          • Leaderboard - Change the label for Player 5 (Yellow) in Alliances_Leaderboard to (Red Knight + (Name of Player 5 (Yellow)))
          • Leaderboard - Change the color of the label for Player 5 (Yellow) in Alliances_Leaderboard to (97.00%, 1.00%, 1.00%) with 0.00% transparency
          • Leaderboard - Sort Alliances_Leaderboard by Label in Ascending order
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Knight_Hero_Var[5] is alive) Equal to True
              • (KR Yellow <gen> contains Knight_Hero_Var[5]) Equal to True
            • Then - Actions
              • Unit - Move Knight_Hero_Var[5] instantly to King_Vendor_Red
            • Else - Actions
          • Set VariableSet limits_current_red = ((Number of players in Group1Red) - 2)
          • Set VariableSet limits_current_blue = ((Number of players in Group2Blue) - 2)
          • Set VariableSet limits_current_teal = ((Number of players in Group3Teal) - 2)
          • Set VariableSet limits_current_purp = ((Number of players in Group4Purp) - 2)
          • Trigger - Turn on Unable to Join Warning Yellow <gen>
          • Trigger - Turn off Yellow join Blue <gen>
          • Trigger - Turn off Yellow join Teal <gen>
          • Trigger - Turn off Yellow join Purp <gen>
          • Trigger - Turn off Yellow join Red <gen>
        • Else - Actions
          • Dialog - Show dialog_join_05 for Player 1 (Red)

  • Yellow join Red 2
    • Events
      • Dialog - A dialog button is clicked for dialog_join_05
    • Conditions
      • (Triggering player) Equal to Player 1 (Red)
      • (King's Castle 0012 <gen> is alive) Equal to True
      • ((This trigger) is on) Equal to True
    • Actions
      • Dialog - Hide dialog_join_05 for Player 1 (Red)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) Current gold) Greater than or equal to 1000
        • Then - Actions
          • Player - Set Player 1 (Red).Current gold to ((Player 1 (Red) Current gold) - 1000)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to dialog_05_accept
        • Then - Actions
          • Custom script: call DestroyGroup(udg_Units_Yellow)
          • Set VariableSet Units_Yellow = (Units owned by Player 5 (Yellow).)
          • Unit Group - Pick every unit in Units_Yellow and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Picked unit) has an item of type Midnight Ankh) Equal to True
                      • ((Picked unit) has an item of type Plans: Black Tent) Equal to True
                • Then - Actions
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Midnight Ankh) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                  • Hero - Drop (Item carried by (Picked unit) of type Plans: Black Tent) from (Picked unit).
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Black_Group_Var.) Equal to True
            • Then - Actions
              • Item - Pick every item in (Entire map) and do (If (Midnight Ankh Equal to (Item-type of (Picked item))) then do (Item - Remove (Picked item)) else do (Do nothing))
              • Item - Pick every item in (Entire map) and do (If (Plans: Black Tent Equal to (Item-type of (Picked item))) then do (Item - Remove (Picked item)) else do (Do nothing))
            • Else - Actions
          • Set VariableSet Units_Yellow = (Units owned by Player 5 (Yellow) matching (((Matching unit) is alive) Equal to True).)
          • Unit Group - Remove Yellow_Hero from Units_Yellow.
          • Unit Group - Remove Unit_Yellow_Altar from Units_Yellow.
          • Unit Group - Remove pirate_ship_unit[5] from Units_Yellow.
          • Unit Group - Remove pirate_ship_unit[5] from Units_Yellow.
          • Unit Group - Pick every unit in Units_Yellow and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Knight's Vault
                      • (Unit-type of (Picked unit)) Equal to Pack Horse (King Unit)
                      • (Unit-type of (Picked unit)) Equal to Wagon
                      • (Unit-type of (Picked unit)) Equal to Free Knight (merc camp)
                      • (Unit-type of (Picked unit)) Equal to Crusader
                      • (Unit-type of (Picked unit)) Equal to Cleric
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from Units_Yellow.
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group1Red.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 1 (Red) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group2Blue.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 2 (Blue) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group3Teal.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 3 (Teal) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Group4Purp.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 4 (Purple) and Change color)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 5 (Yellow) is in Black_Group_Var.) Equal to True
            • Then - Actions
              • Unit Group - Pick every unit in Units_Yellow and do (Unit - Change ownership of (Picked unit) to Player 21 (Coal) and Change color)
            • Else - Actions
          • Custom script: call DestroyGroup(udg_Units_Yellow)
          • Set VariableSet Loyalty_Status_Yel = 0
          • Countdown Timer - Pause Loyalty_Timer_Yellow
          • Countdown Timer - Start Loyalty_Timer_Yellow as a Repeating timer that will expire in 660.00 seconds
          • Unit - Remove Hire_Button_Unit_Yellow[1] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[2] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[3] from the game
          • Unit - Remove Hire_Button_Unit_Yellow[4] from the game
          • Unit - Remove (Load 5 of 1 in hire_buttons_hashtable.) from the game
          • Unit - Remove (Load 5 of 2 in hire_buttons_hashtable.) from the game
          • Unit - Remove (Load 5 of 3 in hire_buttons_hashtable.) from the game
          • Unit - Remove (Load 5 of 4 in hire_buttons_hashtable.) from the game
          • For each (Integer loop_integer_C) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Remove (Load (Player number of (Triggering player)) of loop_integer_C in hire_buttons_hashtable.) from the game
          • Countdown Timer - Start End_Timer as a One-shot timer that will expire in 0.10 seconds
          • Countdown Timer - Start End_Timer_Camera as a One-shot timer that will expire in 1.00 seconds
          • Trigger - Turn off Yellow Black Altar <gen>
          • Trigger - Turn off Blank Ankh Used Yellow <gen>
          • Countdown Timer - Start Yellow_CD as a One-shot timer that will expire in kingdom_join_CD seconds
          • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Red) " over "kingdom_join_CD seconds.
          • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Blue) " over "kingdom_join_CD seconds.
          • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Teal) " over "kingdom_join_CD seconds.
          • Unit - For Unit Knight_Altar_Var[5], start cooldown of ability Pledge Allegiance (Purp) " over "kingdom_join_CD seconds.
          • Hero - Make Player 5 (Yellow) Heroes gain 100.00% experience from future kills
          • Player - Change color of Player 5 (Yellow) to Yellow, Changing color of existing units
          • Player Group - Add Player5Yellow to Group1Red
          • Player Group - Remove Player5Yellow from Group2Blue.
          • Player Group - Remove Player5Yellow from Group3Teal.
          • Player Group - Remove Player5Yellow from Group4Purp.
          • Player Group - Remove Player5Yellow from Group5_NoGroup.
          • Player Group - Remove Player5Yellow from Black_Group_Var.
          • Player Group - Make Group1Red treat Group1Red as an Ally with shared vision
          • Player - Make Player 1 (Red) treat Player 13 (Maroon) as an Ally
          • Player Group - Make Group1Red treat Group2Blue as an Enemy
          • Player Group - Make Group1Red treat Group3Teal as an Enemy
          • Player Group - Make Group1Red treat Group4Purp as an Enemy
          • Player Group - Make Group1Red treat Group5_NoGroup as an Enemy
          • Player Group - Make Group1Red treat Black_Group_Var as an Enemy
          • Player Group - Make Black_Group_Var treat Group1Red as an Enemy
          • Player Group - Make Group2Blue treat Group1Red as an Enemy
          • Player Group - Make Group3Teal treat Group1Red as an Enemy
          • Player Group - Make Group4Purp treat Group1Red as an Enemy
          • Player Group - Make Group5_NoGroup treat Group1Red as an Enemy
          • Player - Make Player 5 (Yellow) treat Player 21 (Coal) as an Enemy
          • Player - Make Player 21 (Coal) treat Player 5 (Yellow) as an Enemy
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Royal Weapons for (Picked player)) Less than (Current research level of Royal Weapons for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Royal Weapons to (Current research level of Royal Weapons for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Royal Armor for (Picked player)) Less than (Current research level of Royal Armor for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Royal Armor to (Current research level of Royal Armor for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Improved Masonry for (Picked player)) Less than (Current research level of Improved Masonry for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Improved Masonry to (Current research level of Improved Masonry for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Black Gunpowder for (Picked player)) Less than (Current research level of Black Gunpowder for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Black Gunpowder to (Current research level of Black Gunpowder for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player Group - Pick every player in Group1Red and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current research level of Animal Breeding for (Picked player)) Less than (Current research level of Animal Breeding for Player 1 (Red))
                • Then - Actions
                  • Player - Set the current research level of Animal Breeding to (Current research level of Animal Breeding for Player 1 (Red)) for (Picked player)
                • Else - Actions
          • Player - Set the current research level of Gluttony to 0 for Player 5 (Yellow)
          • Player - Set Player 5 (Yellow).Food max to 99
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Altar of Knights 0352 <gen> is invulnerable) Equal to False
            • Then - Actions
              • Unit - Add Invulnerable (Neutral) to Altar of Knights 0352 <gen>
            • Else - Actions
          • Set VariableSet altar_point_var_yellow = (Position of Altar of Knights 0352 <gen>)
          • Special Effect - Create a special effect at altar_point_var_yellow using Heavens Gate Channel.mdx
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_altar_point_var_yellow)
          • Special Effect - Create a special effect attached to the origin of Altar of Knights 0352 <gen> using Heavens Gate.mdx
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move Altar of Knights 0352 <gen> instantly to Yellow_Red_Altar
          • Camera - Pan camera for Player 5 (Yellow) to Yellow_Red_Altar over 1.00 seconds
          • Cinematic - Ping minimap for Group1Red at (Center of Red Yellow Altar <gen>) for 5.00 seconds
          • Quest - Display to (All players) the Quest Update message: The |cffffff00Yello...
          • Unit - Order Altar of Knights 0352 <gen> to Revive Hero Yellow_Hero
          • Unit - Change color of Yellow_Hero to Red
          • Unit - Set Unit Skin of Knight_Altar_Var[5] to (Skin ID of Altar of Knights 1689 <gen>)
          • Leaderboard - Change the label for Player 5 (Yellow) in Alliances_Leaderboard to (Red Knight + (Name of Player 5 (Yellow)))
          • Leaderboard - Change the color of the label for Player 5 (Yellow) in Alliances_Leaderboard to (97.00%, 1.00%, 1.00%) with 0.00% transparency
          • Leaderboard - Sort Alliances_Leaderboard by Label in Ascending order
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Knight_Hero_Var[5] is alive) Equal to True
              • (KR Yellow <gen> contains Knight_Hero_Var[5]) Equal to True
            • Then - Actions
              • Unit - Move Knight_Hero_Var[5] instantly to King_Vendor_Red
            • Else - Actions
          • Set VariableSet limits_current_red = ((Number of players in Group1Red) - 2)
          • Set VariableSet limits_current_blue = ((Number of players in Group2Blue) - 2)
          • Set VariableSet limits_current_teal = ((Number of players in Group3Teal) - 2)
          • Set VariableSet limits_current_purp = ((Number of players in Group4Purp) - 2)
          • Trigger - Turn on Unable to Join Warning Yellow <gen>
          • Trigger - Turn off Yellow join Red <gen>
          • Trigger - Turn off Yellow join Blue <gen>
          • Trigger - Turn off Yellow join Teal <gen>
          • Trigger - Turn off Yellow join Purp <gen>
        • Else - Actions
          • Quest - Display to Solo_Group_Yellow the Quest Failed message: The |cffff0000North...
 
Level 21
Joined
Mar 16, 2008
Messages
955
Oh sorry. I forgot to post that trigger but it is set.


  • Set Altar Unit Variables
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Unit_Yellow_Altar = Altar of Knights 0352 <gen>
      • Set VariableSet Knight_Altar_Var[5] = Altar of Knights 0352 <gen>
      • Set VariableSet Unit_OJ_Altar = Altar of Knights 0319 <gen>
      • Set VariableSet Knight_Altar_Var[6] = Altar of Knights 0319 <gen>
      • Set VariableSet Unit_LG_Altar = Altar of Knights 0320 <gen>
      • Set VariableSet Knight_Altar_Var[7] = Altar of Knights 0320 <gen>
      • Set VariableSet Unit_Pink_Altar = Altar of Knights 0342 <gen>
      • Set VariableSet Knight_Altar_Var[8] = Altar of Knights 0342 <gen>
      • Set VariableSet Unit_Grey_Altar = Altar of Knights 0340 <gen>
      • Set VariableSet Knight_Altar_Var[9] = Altar of Knights 0340 <gen>
      • Set VariableSet Unit_LB_Altar = Altar of Knights 0343 <gen>
      • Set VariableSet Knight_Altar_Var[10] = Altar of Knights 0343 <gen>
      • Set VariableSet Unit_DG_Altar = Altar of Knights 0326 <gen>
      • Set VariableSet Knight_Altar_Var[11] = Altar of Knights 0326 <gen>
      • Set VariableSet Unit_Brown_Altar = Altar of Knights 0341 <gen>
      • Set VariableSet Knight_Altar_Var[12] = Altar of Knights 0341 <gen>
      • Set VariableSet Unit_LightBrown_Altar = Altar of Knights 0225 <gen>
      • Set VariableSet Knight_Altar_Var[17] = Altar of Knights 0225 <gen>
      • Set VariableSet Unit_Peach_Altar = Altar of Knights 0226 <gen>
      • Set VariableSet Knight_Altar_Var[18] = Altar of Knights 0226 <gen>
      • Set VariableSet Unit_Lime_Altar = Altar of Knights 0504 <gen>
      • Set VariableSet Knight_Altar_Var[19] = Altar of Knights 0504 <gen>
      • Set VariableSet Unit_LightPurple_Altar = Altar of Knights 0227 <gen>
      • Set VariableSet Knight_Altar_Var[20] = Altar of Knights 0227 <gen>
      • Set VariableSet king_altar_red = Royal Altar 0771 <gen>
      • Set VariableSet king_altar_blue = Royal Altar 0882 <gen>
      • Set VariableSet king_altar_teal = Royal Altar 1549 <gen>
      • Set VariableSet king_altar_purp = Royal Altar 2491 <gen>
 
Level 24
Joined
Feb 27, 2019
Messages
833
Yeah you said it but it seemed like the most obvious potential problem. Right now I am a bit confused because I dont see why it wouldnt work, take note I havnt looked very closely at the triggers. Like you could double check that the variables arnt overwritten or changed before the action runs by displaying the unit name from Knight_Altar_Var[5] and real value of kingdom_Join_CD right before the action runs. The second thing would be to see if theres any weird interaction between any of the other actions in the trigger that execute at the same time. The easiest way to check that would probably be to add a wait of 1 second at the very bottom and start the cooldown after the wait.
 
Level 21
Joined
Mar 16, 2008
Messages
955
Well thanks for reviewing it. The first possibility is unlikely because these triggers/variables are relied on heavily every game and it would be apparent if something was wrong. Your second possibility is more likely. There must be some interaction preventing the cooldown from starting. Yeah maybe a 1 sec timer. I'll edit this post if that works.
 
Top