• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Get life-increasing aura to work with multiple levels

Level 1
Joined
Oct 27, 2019
Messages
2
Hi. First of all, I'm a noo at triggering and coding in general. Now to my problem...
I am currently trying to change a trigger from Uncle. Here is a link to the Thread:
[Spell] - Life-increasing aura

I am trying to make a Hero ability. The ability needs to have at least 4 Levels. Here is the Trigger, how it should looks
  • Set VariableSet GA_TargetMaxHP[GA_CV] = ((Max life of GA_Target) x (Level of GA_Setup_Aura for GA_Source * 0.15))
But is my Trigger how it actually looks.
  • Set VariableSet GA_TargetMaxHP[GA_CV] = ((Max life of GA_Target) x (Load (Level of GA_Setup_Aura for GA_Source) of 1 from (Last created hashtable).))
My question now is: How can I make the Trigger look like Uncles Trigger in the Thread I linked? I don't find an Integer comparision for
  • Level of GA_Setup_Aura for GA_Source
. I chose Hashtable - Load Real Value (hashtable), but I guess that's wrong. If someone has questions feel free to ask. Or if someone can explain it to me or, how I can make it work, I am very thankful :D
I hope I could explain what my problem is. ^^'
Sry for my bad English
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Hi. First of all, I'm a noo at triggering and coding in general. Now to my problem...
I am currently trying to change a trigger from Uncle. Here is a link to the Thread:
[Spell] - Life-increasing aura
You could've just replied to me in that thread :p

The fix takes a few seconds, you just need to change GA_Setup_MaxHP into an Array variable:
  • Granite Aura Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The ability code for Granite Aura: --------
      • Set VariableSet GA_Setup_Aura = Granite Aura (Hero)
      • -------- --------
      • -------- The percentage increase for max hp ( 0.15 = 15% ): --------
      • Set VariableSet GA_Setup_MaxHP_Per_Lvl[1] = 0.15
      • Set VariableSet GA_Setup_MaxHP_Per_Lvl[2] = 0.30
      • Set VariableSet GA_Setup_MaxHP_Per_Lvl[3] = 0.45
      • Set VariableSet GA_Setup_MaxHP_Per_Lvl[4] = 0.60
      • -------- --------
      • -------- The Area of Effect for the Aura: --------
      • Set VariableSet GA_Setup_AoE = 900.00
Then when you reference it later on you use the Level of the ability for GA_Source as the array's [index]:
  • Set VariableSet GA_TargetMaxHP[GA_CV] = ((Max life of GA_Target) x GA_Setup_MaxHP_Per_Lvl[(Level of GA_Setup_Aura for GA_Source)])
Hashtables are for storing data that you don't already have readily available. They also need to be initialized and saved to before you can load anything. Don't bother with them until you've gotten a better understanding of triggers, they're unnecessary most of the time.

Edit: I had to make some other changes to make it work with multiple levels.
I recommend re-importing the whole Granite Aura folder!
 

Attachments

  • Granite Aura v3.w3m
    28 KB · Views: 1
Last edited:
Level 1
Joined
Oct 27, 2019
Messages
2
Hi again. I thought I couldnt answer on the Thread because I thought I need to close them after I found a solution ^^
Now to your answer. Thank you very much. And also thanks for your explanation, why I dont need Hashtables
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Hi again. I thought I couldnt answer on the Thread because I thought I need to close them after I found a solution ^^
Now to your answer. Thank you very much. And also thanks for your explanation, why I dont need Hashtables
Yeah, it was over a year ago so maybe considered necroposting. (I misread it's date as January this year, lol). But still I think it'd be fine since it was on topic.

Anyway, let me know if there are any problems.
 
Top