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

Harshtable & variable arrays & speed question

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
what better if i want make the map faster and i dont care too much how many variable or things i use?

i mean if i use alot information like here what i must attach to 1 item type, buff/or stat what attached to unit.

have lagg or high cpu usage with huge amount of variables? difference in map speed, if i store to harshtable or store to variable is visible?

(a hidden question, if i dont use global variable in trigger just local variables, then dont have conflict if 2 trigger running same time and trigger got wait inside?
example when 1 unit die then wait 8 second and create item in dying unit position, if sametime die more unit then dont overwrited the unit position or unit level if i store to local variable?)


  • Item settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 0 to 9, do (Actions)
        • Loop - Actions
          • Set Attachment_Path[(100 + (Integer A))] = Bronze Armor.mdl
          • Set Attachment_Path[(150 + (Integer A))] = Red Plate Armor.mdl
          • Set Attachment_Path[(200 + (Integer A))] = Mage Armor.mdl
          • Set Attachment_Path[(250 + (Integer A))] = Bronze Helm.mdl
          • Set Attachment_Path[(300 + (Integer A))] = FaceguardoftheHawk.mdl
          • Set Attachment_Path[(350 + (Integer A))] = mage Helmet.mdl
          • Set Attachment_Path[(400 + (Integer A))] = Bronze Boot.mdl
          • Set Attachment_Path[(450 + (Integer A))] = Red Plate Boot.mdl
          • Set Attachment_Path[(500 + (Integer A))] = WolfPeltBoot.mdl
          • Set Attachment_Path[(700 + (Integer A))] = Orc Shield(Left) 2.mdl
          • Set Attachment_Path[(750 + (Integer A))] = Spartan Sword.mdl
          • Set Attachment_Path[(800 + (Integer A))] = GroveKeeperHammer.mdl
          • Set Attachment_Path[(850 + (Integer A))] = Longsword.mdl
          • Set Attachment_Path[(900 + (Integer A))] = Copperbow.mdl
          • Set Attachment_Path[(950 + (Integer A))] = Bone sword.MDL
          • Set Attachment_Path[(1000 + (Integer A))] = Quarterstaff.mdl
          • Set Item_Lv[(100 + (Integer A))] = (((Integer A) x 10) + 2)
          • Set Item_Lv[(150 + (Integer A))] = (((Integer A) x 10) + 2)
          • Set Item_Lv[(200 + (Integer A))] = (((Integer A) x 10) + 2)
          • Set Item_Lv[(250 + (Integer A))] = (((Integer A) x 10) + 3)
          • Set Item_Lv[(300 + (Integer A))] = (((Integer A) x 10) + 3)
          • Set Item_Lv[(350 + (Integer A))] = (((Integer A) x 10) + 3)
          • Set Item_Lv[(400 + (Integer A))] = (((Integer A) x 10) + 1)
          • Set Item_Lv[(450 + (Integer A))] = (((Integer A) x 10) + 1)
          • Set Item_Lv[(500 + (Integer A))] = (((Integer A) x 10) + 1)
          • Set Item_Lv[(600 + (Integer A))] = (((Integer A) x 10) + 4)
          • Set Item_Lv[(650 + (Integer A))] = (((Integer A) x 10) + 5)
          • Set Item_Lv[(700 + (Integer A))] = (((Integer A) x 10) + 6)
          • Set Item_Lv[(750 + (Integer A))] = (((Integer A) x 10) + 7)
          • Set Item_Lv[(800 + (Integer A))] = (((Integer A) x 10) + 8)
          • Set Item_Lv[(850 + (Integer A))] = (((Integer A) x 10) + 9)
          • Set Item_Lv[(900 + (Integer A))] = (((Integer A) x 10) + 6)
          • Set Item_Lv[(950 + (Integer A))] = (((Integer A) x 10) + 7)
          • Set Item_Lv[(1000 + (Integer A))] = (((Integer A) x 10) + 4)
          • Set Item_AttackSpeed[(750 + (Integer A))] = 0
          • Set Item_AttackSpeed[(850 + (Integer A))] = 10
          • Set Item_AttackSpeed[(900 + (Integer A))] = 0
          • Set Item_AttackSpeed[(950 + (Integer A))] = 25
          • Set Item_MovSpeed[(400 + (Integer A))] = (((Integer A) + 1) x 2)
          • Set Item_MovSpeed[(450 + (Integer A))] = (((Integer A) + 1) x 5)
          • Set Item_MovSpeed[(500 + (Integer A))] = (((Integer A) + 1) x 1)
          • Set Item_Pdef[(100 + (Integer A))] = (Integer(((10.00 x 3.33) x (Real(Item_Lv[(100 + (Integer A))])))))
          • Set Item_Mdef[(100 + (Integer A))] = (Integer(((3.00 x 3.33) x (Real(Item_Lv[(100 + (Integer A))])))))
          • Set Item_Pdef[(150 + (Integer A))] = (Integer(((5.00 x 3.33) x (Real(Item_Lv[(150 + (Integer A))])))))
          • Set Item_Mdef[(150 + (Integer A))] = (Integer(((5.00 x 3.33) x (Real(Item_Lv[(150 + (Integer A))])))))
          • Set Item_Pdef[(200 + (Integer A))] = (Integer(((3.00 x 3.33) x (Real(Item_Lv[(200 + (Integer A))])))))
          • Set Item_Mdef[(200 + (Integer A))] = (Integer(((10.00 x 3.33) x (Real(Item_Lv[(200 + (Integer A))])))))
          • Set Item_Pdef[(250 + (Integer A))] = (Integer(((7.33 x 3.33) x (Real(Item_Lv[(250 + (Integer A))])))))
          • Set Item_Mdef[(250 + (Integer A))] = (Integer(((2.20 x 3.33) x (Real(Item_Lv[(250 + (Integer A))])))))
          • Set Item_Pdef[(300 + (Integer A))] = (Integer(((3.67 x 3.33) x (Real(Item_Lv[(300 + (Integer A))])))))
          • Set Item_Mdef[(300 + (Integer A))] = (Integer(((3.67 x 3.33) x (Real(Item_Lv[(300 + (Integer A))])))))
          • Set Item_Pdef[(350 + (Integer A))] = (Integer(((2.20 x 3.33) x (Real(Item_Lv[(350 + (Integer A))])))))
          • Set Item_Mdef[(350 + (Integer A))] = (Integer(((7.33 x 3.33) x (Real(Item_Lv[(350 + (Integer A))])))))
          • Set Item_Pdef[(400 + (Integer A))] = (Integer(((5.00 x 3.33) x (Real(Item_Lv[(400 + (Integer A))])))))
          • Set Item_Mdef[(400 + (Integer A))] = (Integer(((1.50 x 3.33) x (Real(Item_Lv[(400 + (Integer A))])))))
          • Set Item_Pdef[(450 + (Integer A))] = (Integer(((2.50 x 3.33) x (Real(Item_Lv[(450 + (Integer A))])))))
          • Set Item_Mdef[(450 + (Integer A))] = (Integer(((2.50 x 3.33) x (Real(Item_Lv[(450 + (Integer A))])))))
          • Set Item_Pdef[(500 + (Integer A))] = (Integer(((1.50 x 3.33) x (Real(Item_Lv[(500 + (Integer A))])))))
          • Set Item_Mdef[(500 + (Integer A))] = (Integer(((5.00 x 3.33) x (Real(Item_Lv[(500 + (Integer A))])))))
          • Set Item_Crit[(600 + (Integer A))] = ((Integer A) / 5)
          • Set Item_Dmg[(600 + (Integer A))] = (((Integer A) + 1) x 10)
          • Set Item_Mp[(250 + (Integer A))] = (25 x ((Integer A) + 1))
          • Set Item_Mp[(300 + (Integer A))] = (35 x ((Integer A) + 1))
          • Set Item_Mp[(350 + (Integer A))] = (50 x ((Integer A) + 1))
          • Set Item_HP[(250 + (Integer A))] = (75 x ((Integer A) + 1))
          • Set Item_HP[(300 + (Integer A))] = (35 x ((Integer A) + 1))
          • Set Item_HP[(250 + (Integer A))] = (25 x ((Integer A) + 1))
          • Set Item_Pdef[(700 + (Integer A))] = (((Integer A) + 1) x 100)
          • Set Item_Dmg[(750 + (Integer A))] = (Item_Lv[(750 + (Integer A))] x 12)
          • Set Item_Dmg[(800 + (Integer A))] = (Item_Lv[(800 + (Integer A))] x 20)
          • Set Item_Dmg[(850 + (Integer A))] = (Item_Lv[(850 + (Integer A))] x 15)
          • Set Item_Dmg[(900 + (Integer A))] = (Item_Lv[(900 + (Integer A))] x 14)
          • Set Item_Dmg[(950 + (Integer A))] = (Item_Lv[(950 + (Integer A))] x 10)
          • Set Item_Dmg[(1000 + (Integer A))] = (((Integer A) + 1) x 10)
          • Set Item_Spellpower[(1000 + (Integer A))] = (Item_Lv[(1000 + (Integer A))] x 13)
          • Set Item_Socket[(100 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.90)))
          • Set Item_Socket[(150 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.90)))
          • Set Item_Socket[(200 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.90)))
          • Set Item_Socket[(250 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.50)))
          • Set Item_Socket[(300 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.50)))
          • Set Item_Socket[(350 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.50)))
          • Set Item_Socket[(400 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.60)))
          • Set Item_Socket[(450 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.60)))
          • Set Item_Socket[(500 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.60)))
          • Set Item_Socket[(550 + (Integer A))] = 7
          • Set Item_Socket[(700 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.40)))
          • Set Item_Socket[(750 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.40)))
          • Set Item_Socket[(800 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.70)))
          • Set Item_Socket[(850 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.70)))
          • Set Item_Socket[(900 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.40)))
          • Set Item_Socket[(950 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.70)))
          • Set Item_Socket[(1000 + (Integer A))] = (Integer((((Real((Integer A))) + 1.00) x 0.70)))
  • Stat multiboard update
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) slot status) Equal to Is playing
              • ((Player((Integer A))) controller) Equal to User
            • Then - Actions
              • Set TempUnit = Hero[(Integer A)]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Stat_Vigor[(Integer A)] Greater than 299
                  • Stat_Fury_Unit_3[(Integer A)] Equal to No unit
                • Then - Actions
                  • Set TempPoint = (Random point in (Playable map area))
                  • Unit - Create 1 Stat Point for (Player((Integer A))) at TempPoint facing Default building facing degrees
                  • Set Stat_Fury_Unit_3[(Integer A)] = (Last created unit)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Stat_Vigor[(Integer A)] Greater than 199
                  • Stat_Fury_Unit_2[(Integer A)] Equal to No unit
                • Then - Actions
                  • Set TempPoint = (Random point in (Playable map area))
                  • Unit - Create 1 2 Fury Point for (Player((Integer A))) at TempPoint facing Default building facing degrees
                  • Set Stat_Fury_Unit_2[(Integer A)] = (Last created unit)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Stat_Vigor[(Integer A)] Greater than 99
                  • Stat_Fury_Unit_1[(Integer A)] Equal to No unit
                • Then - Actions
                  • Set TempPoint = (Random point in (Playable map area))
                  • Unit - Create 1 1 Fury Point for (Player((Integer A))) at TempPoint facing Default building facing degrees
                  • Set Stat_Fury_Unit_1[(Integer A)] = (Last created unit)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
              • For each (Integer B) from 1 to 12, do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Buff_Timer[(((Integer A) x 30) + (Integer B))] Greater than 0
                      • Buff_Pause[(((Integer A) x 30) + (Integer B))] Equal to False
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Buff_Timer[(((Integer A) x 30) + (Integer B))] Equal to 10
                        • Then - Actions
                          • Set PlayerGroup = (Player group((Player((Integer A)))))
                          • Game - Display to PlayerGroup the text: (|cffffcc00 + (Buff_Name[(30 + (Integer B))] + buff|r disapear soon!))
                          • Custom script: call DestroyForce(udg_PlayerGroup)
                        • Else - Actions
                      • Set Buff_Timer[(((Integer A) x 30) + (Integer B))] = (Buff_Timer[(((Integer A) x 30) + (Integer B))] - 1)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Integer B) Not equal to 8
                          • Buff_Value[(((Integer A) x 30) + (Integer B))] Not equal to 0
                        • Then - Actions
                          • Set Buff_Value[(((Integer A) x 30) + (Integer B))] = 0
                          • Set PlayerGroup = (Player group((Player((Integer A)))))
                          • Game - Display to PlayerGroup the text: (|cffffcc00 + (Buff_Name[(30 + (Integer B))] + buff|r gone!))
                          • Custom script: call DestroyForce(udg_PlayerGroup)
                        • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Buff_Timer[(((Integer A) x 30) + 8)] Equal to 0
                  • Buff_Value[(((Integer A) x 30) + 8)] Not equal to 0
                • Then - Actions
                  • Set A = Buff_Value[(((Integer A) x 30) + 8)]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • A Greater than 0
                    • Then - Actions
                      • Set Max_HP = A
                      • Set TempNr2 = (Max_HP mod 1000)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 1000)
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 5
                          • Unit - Remove Add HP from TempUnit
                      • Set Max_HP = TempNr2
                      • Set TempNr2 = (Max_HP mod 100)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 100)
                      • Set Max_HP = TempNr2
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 4
                          • Unit - Remove Add HP from TempUnit
                      • Set TempNr2 = (Max_HP mod 10)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 10)
                      • Set Max_HP = TempNr2
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 3
                          • Unit - Remove Add HP from TempUnit
                      • For each (Integer A) from 1 to Max_HP, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 2
                          • Unit - Remove Add HP from TempUnit
                    • Else - Actions
                      • Set Max_HP = (-1 x aitem_diff11)
                      • Set TempNr2 = (Max_HP mod 1000)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 1000)
                      • Set Max_HP = TempNr2
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 9
                          • Unit - Remove Add HP from TempUnit
                      • Set TempNr2 = (Max_HP mod 100)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 100)
                      • Set Max_HP = TempNr2
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 8
                          • Unit - Remove Add HP from TempUnit
                      • Set TempNr2 = (Max_HP mod 10)
                      • Set Loop_Integer = ((Max_HP - TempNr2) / 10)
                      • Set Max_HP = TempNr2
                      • For each (Integer A) from 1 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 7
                          • Unit - Remove Add HP from TempUnit
                      • For each (Integer A) from 2 to Loop_Integer, do (Actions)
                        • Loop - Actions
                          • Unit - Add Add HP to TempUnit
                          • Unit - Set level of Add HP for TempUnit to 6
                          • Unit - Remove Add HP from TempUnit
                • Else - Actions
              • Set TotalEvasion[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 10)] + (Stat_Evasion[(Integer A)] + ((Agility of Hero[(Integer A)] (Include bonuses)) / 20)))
              • Set TotalCritChance[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 1)] + (Stat_Crit[(Integer A)] + (((Agility of Hero[(Integer A)] (Include bonuses)) / 20) + 1)))
              • Set TotalCritDmg[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 2)] + (Stat_RageDmg[(Integer A)] + 200))
              • Set TotalAttLv[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 3)] + Stat_AttackLv[(Integer A)])
              • Set TotalDefLv[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 4)] + Stat_DefLv[(Integer A)])
              • Set TotalSpellPower[(Integer A)] = (Stat_SpellPower[(Integer A)] + (Buff_Value[(((Integer A) x 30) + 13)] + (Integer((((Real(Stat_SpellPower[(Integer A)])) / 100.00) x (Real((Intelligence of Hero[(Integer A)] (Include bonuses)))))))))
              • Set TempNr2 = (Strength of Hero[(Integer A)] (Include bonuses))
              • Set TempNr3 = (Agility of Hero[(Integer A)] (Include bonuses))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempNr3 Greater than TempNr2
                • Then - Actions
                  • Set TotalDmg[(Integer A)] = (Stat_Dmg[(Integer A)] + (Integer((((Real(Stat_Dmg[(Integer A)])) / 100.00) x (Real(TempNr3))))))
                • Else - Actions
                  • Set TotalDmg[TotalDmg[(Integer A)]] = (Stat_Dmg[(Integer A)] + (Integer((((Real(Stat_Dmg[(Integer A)])) / 100.00) x (Real(TempNr2))))))
              • -------- dmg --------
              • Set TempNr2 = (((Stat_Dmg[plNR] - (Stat_Dmg[plNR] mod 1000)) / 1000) + 1)
              • Unit - Set level of Add Dmg (1000-9000) for (Triggering unit) to TempNr2
              • Set TempNr3 = (Stat_Dmg[plNR] mod 1000)
              • Set TempNr2 = (((TempNr3 - (TempNr3 mod 100)) / 100) + 1)
              • Unit - Set level of Add Dmg (100-900) for (Triggering unit) to TempNr2
              • Set TempNr3 = (TempNr3 mod 100)
              • Set TempNr2 = (((TempNr3 - (TempNr3 mod 10)) / 10) + 1)
              • Unit - Set level of Add Dmg (10-90) for (Triggering unit) to TempNr2
              • Set TempNr3 = (TempNr3 mod 10)
              • Set TempNr2 = (TempNr3 + 1)
              • Unit - Set level of Add Dmg (0-9) for (Triggering unit) to TempNr2
              • Set TotalPDef[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 11)] + Stat_Pdef[(Integer A)])
              • Set TotalMDef[(Integer A)] = (Buff_Value[(((Integer A) x 30) + 12)] + Stat_Mdef[(Integer A)])
              • Set TotalExp[(Integer A)] = (((Difficulty x 50) + Stat_Exp[(Integer A)]) + 100)
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 2 to ((String(Item_Socket[Helm[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 1)]))))
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 3 to ((String(Item_Socket[Armor[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 2)]))))
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 4 to ((String(Item_Socket[Weapon[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 3)]))))
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 5 to ((String(Item_Socket[Boot[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 4)]))))
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 6 to ((String(Item_Socket[Shield[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 5)]))))
              • Multiboard - Set the text for Multiboard[(Integer A)] item in column 3, row 10 to ((String(Item_Socket[Wings[(Integer A)]])) + (/ + (String(Stat_Sockets[(((Integer A) x 10) + 9)]))))
              • For each (Integer B) from 1 to 10, do (Actions)
                • Loop - Actions
                  • Multiboard - Set the text for Multiboard[(Integer A)] item in column 4, row ((Integer B) + 1) to ( + (String(Stat_Refine[(((Integer A) x 20) + (Integer B))])))
              • Hero - Make (Owner of Hero[(Integer A)]) Heroes gain (Real(TotalExp[(Integer A)]))% experience from future kills
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 2 to ((String(TotalCritChance[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 3 to ((String(TotalCritDmg[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 4 to ((String(Stat_LifeSteal[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 5 to ((String(Stat_Reflect[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 6 to (String(TotalAttLv[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 7 to (String(TotalDefLv[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 8 to ((String(Stat_BlockDmg[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 9 to ((String(TotalEvasion[(Integer A)])) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 10 to (String(Stat_Vigor[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 11 to ((String(Stat_SpellPower[(Integer A)])) + <Empty String>)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 12 to ((String((Stat_AttackSpeed[(Integer A)] + 100))) + %)
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 13 to (String((200 + Stat_MovSpeed[(Integer A)])))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 14 to (String(TotalPDef[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 15 to (String(TotalMDef[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 16 to (String(TotalExp[(Integer A)]))
              • Multiboard - Set the text for Multiboard2[(Integer A)] item in column 2, row 17 to (String(Stat_Point[(Integer A)]))
            • Else - Actions
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Hashtables are slower than variables and arrays. The advantage of hashtables is that they act as a 2D array of infinite size. A good idea is to use a hashtable to map values to object ids (their raw value) as the id is an integer of any size so not possible to map to an array directly.

(a hidden question, if i dont use global variable in trigger just local variables, then dont have conflict if 2 trigger running same time and trigger got wait inside?
example when 1 unit die then wait 8 second and create item in dying unit position, if sametime die more unit then dont overwrited the unit position or unit level if i store to local variable?)
Locals in JASS script work the same as local variables in every language. They get stored in a stack and as such are thread specific. 2 threads running the same procedure will thus have completly different storage locations for a local.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Hashtables are slower than variables and arrays. The advantage of hashtables is that they act as a 2D array of infinite size. A good idea is to use a hashtable to map values to object ids (their raw value) as the id is an integer of any size so not possible to map to an array directly.

the arrays have a limition? coz i made around 230+ custom item and for each item i made another 10-20 array, also have alot for buffs/stats/refines etc and still i dont made my custom abilities :/

where i must stop with variables or all depend on player pc, or map will crash after i use too much array? ( mostly integer arrays )
 
Status
Not open for further replies.
Top