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

Triggered aura doesn't work like it should...

Status
Not open for further replies.
Level 15
Joined
Jul 19, 2007
Messages
824
I've got a kinda complicated triggered aura ability I just can't get working like it should.
It works like this: When the Hero joins with his allies to fight, everyone feels the union team, and with it, any friendly unit that is affected by this gain 1 bonus to attack damage and defence, according to number of units affected by this.|n|n|cffffcc00Level 1|r - Limit bonus points earned to attack damage and defense of this is 5.|n|cffffcc00Level 2|r - Limit bonus points earned to attack damage and defense of this is 11.|n|cffffcc00Level 3|r - Limit bonus points earned to attack damage and defense of this is 17.|n|cffffcc00Level 4|r - Limit bonus points earned to attack damage and defense of this is 23.|n|n|cffFF0000AOE: |r 300/400/500/600

Well the problem with this aura ability is that it doesn't give the bonus to attack damage and armor for all units affected by it, it just give it to the first 5 units that first got affected by it because the limit of bonus to attack damage and armor is 5 in level 1 but I still want everyone who got affected by the aura buff to get the +5 bonus to attack damage and armor, not just the first 4 who got affected by it (it becames 5 with the Hero with the aura) and sometimes it seems to ignore giving any bonus to attack damage or armor at all to any friendly units :-/ What's wrong with this aura? Pls help anyone..

The triggers of the aura.
  • Skill Stand and fight together
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Stand and fight together
    • Actions
      • -------- ######################### --------
      • -------- ### --- HashTable --- ### --------
      • Hashtable - Create a hashtable
      • Set HashTable[5] = (Last created hashtable)
      • -------- ### --- Salvando o Gladiator --- ### --------
      • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Triggering unit)) in HashTable[5]
      • -------- ######################### --------
      • -------- ### --- Configure a Variavel --- ### --------
      • Set Unit[8] = (Load 1 of (Key (Triggering unit)) in HashTable[5])
      • -------- ######################### --------
      • -------- ### --- Ligando as Triggers Essênciais desta Abilidade/Feitiço --- ### --------
      • Trigger - Turn on PAS Stand and fight together Loop 1 <gen>
      • Trigger - Turn on PAS Stand and fight together Loop 2 <gen>
      • -------- ######################### --------
  • PAS Stand and fight together Loop 1
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- ######################### --------
      • -------- ### --- Configure Algumas Variaveis --- ### --------
      • -------- Posição do Gladiador: --------
      • Set ABI_Point_Position[7] = (Position of Unit[7])
      • -------- Grupo: --------
      • Set ABI_Unit_Group[7] = (Units in (Playable map area) matching (((Matching unit) has buff Stand and fight together ) Equal to True))
      • -------- ######################### --------
      • Unit Group - Pick every unit in ABI_Unit_Group[7] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in ABI_Unit_Group[7]) Less than (6 x (Level of Stand and fight together for Unit[8]))
              • ((Picked unit) has buff Stand and fight together ) Equal to True
              • ((Picked unit) is dead) Equal to False
            • Then - Actions
              • -------- ######################### --------
              • -------- Adicionando a Abilidade de Dano Bonus: --------
              • Unit - Add Damage Bonus (Stand and fight together) to (Picked unit)
              • Unit - Set level of Damage Bonus (Stand and fight together) for (Picked unit) to (Number of units in ABI_Unit_Group[7])
              • -------- Adicionando a Abilidade de Armor Bonus: --------
              • Unit - Add Armor Bonus (Stand and fight together) to (Picked unit)
              • Unit - Set level of Armor Bonus (Stand and fight together) for (Picked unit) to (Number of units in ABI_Unit_Group[7])
              • -------- ######################### --------
            • Else - Actions
      • -------- ######################### --------
      • -------- ### --- Removendo a(s) Posição/Posições e o Destruindo o(s) Grupo(s) --- ### --------
      • Custom script: call RemoveLocation (udg_ABI_Point_Position[7])
      • Custom script: call DestroyGroup(udg_ABI_Unit_Group[6])
      • -------- ######################### --------
  • PAS Stand and fight together Loop 2
    • Events
      • Time - Every 0.07 seconds of game time
    • Conditions
    • Actions
      • -------- ######################### --------
      • -------- Configurando Algumas Variáveis: --------
      • -------- Posição do Gladiador: --------
      • Set ABI_Point_Position[7] = (Position of Unit[8])
      • -------- Grupo: --------
      • Set ABI_Unit_Group[7] = (Units in (Playable map area) matching (((Matching unit) has buff Stand and fight together ) Equal to False))
      • -------- ######################### --------
      • Unit Group - Pick every unit in ABI_Unit_Group[7] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to False
            • Then - Actions
              • -------- ######################### --------
              • -------- ### --- Removendo as Abilidades --- ### --------
              • -------- Removendo a Abilidade de Dano Bonus: --------
              • Unit - Remove Damage Bonus (Stand and fight together) from (Picked unit)
              • -------- Removendo a Abilidade de Armor Bonus: --------
              • Unit - Remove Armor Bonus (Stand and fight together) from (Picked unit)
              • -------- ######################### --------
            • Else - Actions
      • -------- ######################### --------
      • -------- ### --- Removendo a(s) Posição/Posições e o Destruindo o(s) Grupo(s) --- ### --------
      • Custom script: call DestroyGroup(udg_ABI_Unit_Group[7])
      • Custom script: call RemoveLocation (udg_ABI_Point_Position[7])
      • -------- ######################### --------
 
Level 15
Joined
Jul 19, 2007
Messages
824
1. You create the hashtable(s) in a init trigger.
2. You save the handle of a unit into an hashtable, that is completely useless. You should ave save the unit itself.
3. only turn on the loops if the unit group used inside that trigger is empty.
4. REMOVE ALL THOSE FUCKING HASHTAGS!
Well I'm not the creator of this ability, I just copied it from a spellpack and edited it a little. I'm very noobish at triggering and would be very thankful if someone would like to help me fix this aura ability.. :)
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
1. You create the hashtable(s) in a init trigger.
2. You save the handle of a unit into an hashtable, that is completely useless. You should ave save the unit itself.
3. only turn on the loops if the unit group used inside that trigger is empty.
4. REMOVE ALL THOSE FUCKING HASHTAGS!

He actually save the unit itself, its only the.GUI syntax for it. In GUI handleid is actually Key
 
Status
Not open for further replies.
Top