Armor Buffing Ability that stacks with itself

jedi8955

New Member
Reaction score
4
I need an armor buffing Ability that stacks with itself. I have a front-line unit that does little damage but is designed to take hits well. Basically, the more units that use this ability at the same time, the more effective it's supposed to be.

Here's the ability as designed:

"Dey Terk Er Jorbs!"

This unit's rage at being recently unemployed allows it and others nearby to ignore damage. Adds 2 Armor in 300 AoE, stacks with other units using "Dey Terk Er Jorbs!"


As you can see, it's not entirely serious :) I don't expect players to build too many of these, but that 2 armor will end up changing during testing, I'm sure of it. I'm not sure if there's something pre-made that I can kitbash into working and just missing it, or if I'll need to end up triggering this.

As always, thanks for any help :)
 

HydraRancher

Truth begins in lies
Reaction score
197
Trigger:
  • Initialization
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Hashtable - Create a Hashtable
      • Set Dey Terk Er Jorbs Hashtable to (Last Created Hashtable)


Trigger:
  • Dey Terk Er Jorbs!
    • Events
      • Unit - A Unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Temp_Int = 0
      • Set Temp_Group = Units in 300 Range of (Triggering Unit) matching (Owner of (Matching Unit)) is an ally of (Owner of (Triggering Unit))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Int = Temp_Int + 1
          • Hashtable - Save Unit (Picked Unit) as Temp_Int of (Key(Triggering Unit))
          • -----------Add Armor-----------
          • ----I recommend using EGUI's +armor system----
          • EGUI Unit - Add 2 Armor to (Picked Unit) as a Temporary Bonus
      • Hashtable - Save Integer Temp_Int as 0 of (Key(Triggering Unit))
      • Wait 10.00 seconds
      • For each (Integer A) from 1 to (Load Integer 0 (Key(Triggering Unit)) do (Actions)
        • Loop - Actions
          • EGUI Unit - Add -2 Armor to (Load Unit (Integer A) (Key(Triggering Unit)) as a Temporary Bonus
      • Hashtable - Clear all Child hashtables of type Child hashtables
      • Custom Script: call DestroyGroup (udg_Temp_Point)




1. If you want it to remove after 10 seconds, you need to make it in Vanilla WE (Normal) then get EGUI and use the armor bonus (Or download it from the thread made by Tom_Jones)


2.If you DONT want it to...

Trigger:
  • Dey Terk Er Jorbs!
    • Events
      • Unit - A Unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Temp_Group = Units in 300 Range of (Triggering Unit) matching (Owner of (Matching Unit)) is an ally of (Owner of (Triggering Unit))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • -----------Add Armor-----------
          • ----I recommend using EGUI's +armor system----
          • EGUI Unit - Add 2 Armor to (Picked Unit) as a Temporary Bonus
      • Hashtable - Clear all Child hashtables of type Child hashtables
      • Custom Script: call DestroyGroup (udg_Temp_Point)


You only need this trigger.
 

jedi8955

New Member
Reaction score
4
Awesome, thanks man. I just have one question on this, regarding this section here.

Trigger:
  • Actions
    • -----------Add Armor-----------
    • ----I recommend using EGUI's +armor system----
    • EGUI Unit - Add 2 Armor to (Picked Unit) as a Temporary Bonus
    • <lines removed for space>
      • EGUI Unit - Add -2 Armor to (Load Unit (Integer A) (Key(Triggering Unit)) as a Temporary Bonus

Is there a way to do this without EGUI? Unfortunatly, I work on this map a bunch of different places other than just my main machine (mostly at my old college), installing a bunch of mods isn't very feasible. If not, I'll just have to suck it up and deal, but I'd like to be able to work on it wherever I happen to be.

Thanks for your help!
 

HydraRancher

Truth begins in lies
Reaction score
197
Like I also said, I think Tom_Jones made a system for that, look it up in the Tutorial section.

EDIT: Oh sorry, I forgot this leaks, edited the above triggers.
 

jedi8955

New Member
Reaction score
4
Like I also said, I think Tom_Jones made a system for that, look it up in the Tutorial section.

EDIT: Oh sorry, I forgot this leaks, edited the above triggers.

Oh, my bad. I thought you were referencing EGUI again on that. I'll go take a look.

Thanks again for your help. :)
 

jedi8955

New Member
Reaction score
4
Well, I wasn't able to find the thread by Tom Jones, but I figured out a way to get it done without using EGUI.

I made a multi-level item ability.

Dey Terk Er Jorbs 1 (Armor Bonus)

Level 1: Adds 0 Armor.
Lv 2: Adds 2 Armor
Lv 3: Adds 4 Armor
etc, etc.

It allows me to put a theoretical maximum on how much armor units can gain.

All the units then had the item ability added.

Then this line:

Trigger:
  • EGUI Unit - Add 2 Armor to (Picked Unit) as a Temporary Bonus


Turned into:

Trigger:
  • Unit - Increase the level of Dey Terk Er Jorbs 1 (Armor Bonus)


Then when the duration expires, it reduces the level of the ability.


Thanks a bunch for the help with this, it was my first foray into hashtables. Super useful :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top