Extra Armor from Items

RoarMan

Member
Reaction score
12
Basically I'm trying to make a skill that gives extra armor per item in the Hero's inventory. Problem is it's not working :(. The skill is based off Devotion Aura and that all works fine, but the bonus armor doesn't seem to kick in.
Trigger:
  • Armor Clad
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Armor Clad
    • Actions
      • EGUI Unit - Set the armor of (Triggering unit) to ((Real(((Level of Armor Clad for (Triggering unit)) x (Number of items carried by (Triggering unit))))) + (Get the armor of (Triggering unit)))


Trigger:
  • Armor Clad Item
    • Events
      • Unit - A unit Acquires an item
      • Unit - A unit Loses an item
    • Conditions
      • ((Hero manipulating item) has buff Armor Clad ) Equal to True
    • Actions
      • EGUI Unit - Set the armor of (Hero manipulating item) to ((Real(((Level of Armor Clad for (Hero manipulating item)) x (Number of items carried by (Hero manipulating item))))) + (Get the armor of (Triggering unit)))


OH and yes, I am using EGUI.
 

Icyculyr

I'm a Mac
Reaction score
68
Hey, I don't know anything about EGUI but I have a few idea's.

  • Try adding a debug message after each line, to make sure the code is running
  • Does it work if you just set the armor to something static, like set the armor to 5?
  • Can you break it down, set iItemCount = Number of items carried by (Hero manipulating item)
    And set iArmorCladLevel = Level of Armor Clad for (Triggering unit)
    And just use those values, so that the code is little smaller, and perhaps easier to debug, you could add a debug message to see what iArmorCladLevel is and what iItemCount is

Kind Regards
 

Dynamis

New Member
Reaction score
2
Basically I'm trying to make a skill that gives extra armor per item in the Hero's inventory. Problem is it's not working :(. The skill is based off Devotion Aura and that all works fine, but the bonus armor doesn't seem to kick in.
Trigger:
  • Armor Clad
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Armor Clad
    • Actions
      • EGUI Unit - Set the armor of (Triggering unit) to ((Real(((Level of Armor Clad for (Triggering unit)) x (Number of items carried by (Triggering unit))))) + (Get the armor of (Triggering unit)))


Trigger:
  • Armor Clad Item
    • Events
      • Unit - A unit Acquires an item
      • Unit - A unit Loses an item
    • Conditions
      • ((Hero manipulating item) has buff Armor Clad ) Equal to True
    • Actions
      • EGUI Unit - Set the armor of (Hero manipulating item) to ((Real(((Level of Armor Clad for (Hero manipulating item)) x (Number of items carried by (Hero manipulating item))))) + (Get the armor of (Triggering unit)))


OH and yes, I am using EGUI.

Try using real value of armor unit instead of Get the armor of.
 

RoarMan

Member
Reaction score
12
Hey, I don't know anything about EGUI but I have a few idea's.
Try adding a debug message after each line, to make sure the code is running
Does it work if you just set the armor to something static, like set the armor to 5?
Can you break it down, set iItemCount = Number of items carried by (Hero manipulating item)
And set iArmorCladLevel = Level of Armor Clad for (Triggering unit)
And just use those values, so that the code is little smaller, and perhaps easier to debug, you could add a debug message to see what iArmorCladLevel is and what iItemCount is

Kind Regards
Good idea, the obviousness of it escaped me. I shall play around to see what values I am getting.

Try using real value of armor unit instead of Get the armor of.
I'm sorry but I can't seem to find this solution anywhere.
 
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