Any idea why my ability doesnt work?

marvey323

Member
Reaction score
1
Bright Armor:
Adds temporary armor and maximum health to a target unit (Cleric spell).

Basically, I have two dummies:
- Bright Armor dummy (adds the temporary armor)
- Bright Armor health dummy (adds the temporary maximum health)

The ability is adding the right amount of armor but it's only triggering the level 1 slot for the health dummy. (Each dummy is set to 100 levels and the trigger is able to read the 'Bright Armor dummy' levels just fine, but it cant read the levels of the 'Bright Armor health dummy').


Trigger:
  • Bright Armor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bright Armor
    • Actions
      • Set BrightArmor_Target = (Target unit of ability being cast)
      • Set Lvl_BrightArmor = (Real((Level of Bright Armor for (Triggering unit))))
      • Set Intelligence = (Real((Intelligence of (Triggering unit) (Include bonuses))))
      • Set BrightArmor_Amount = (Intelligence x (0.10 + (0.05 x (Lvl_BrightArmor - 1.00))))
      • Set BrightArmorLife_Amount = (Intelligence - 9.00)
      • -------- Set minimum amount to 5 (since Paladin starts with low intelligence) --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BrightArmor_Amount Less than 5.00
        • Then - Actions
          • Set BrightArmor_Amount = 5.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Bright Armor dummy for BrightArmor_Target) Greater than 0
        • Then - Actions
          • Unit - Remove Bright Armor dummy from BrightArmor_Target
          • Unit - Remove Bright Armor Life Dummy from BrightArmor_Target
          • Unit - Add Bright Armor dummy to BrightArmor_Target
          • Unit - Set level of Bright Armor dummy for BrightArmor_Target to (Integer(BrightArmor_Amount))
          • Unit - Add Bright Armor Life Dummy to BrightArmor_Target
          • Unit - Set level of Bright Armor Life Dummy for BrightArmor_Target to (Integer(BrightArmorLife_Amount))
        • Else - Actions
          • Unit - Add Bright Armor dummy to BrightArmor_Target
          • Unit - Set level of Bright Armor dummy for BrightArmor_Target to (Integer(BrightArmor_Amount))
          • Unit - Add Bright Armor Life Dummy to BrightArmor_Target
          • Unit - Set level of Bright Armor Life Dummy for BrightArmor_Target to (Integer(BrightArmorLife_Amount))


Trigger:
  • Remove Bright Armor
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set HasBrightArmorBuff = (Units in (Playable map area) matching ((Level of Bright Armor dummy for (Matching unit)) Greater than 0))
      • Unit Group - Pick every unit in HasBrightArmorBuff and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Bright Armor Buff ) Equal to False
            • Then - Actions
              • Unit - Remove Bright Armor dummy from (Picked unit)
              • Unit - Remove Bright Armor Life Dummy from (Picked unit)
            • Else - Actions




let me know if i need to give any more info.
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
Yeah I know why its not working, but your not gona like it. The item ability life bonus can't be used as a leveled spell. No matter what you do if you give it to a unit it will always be level one. Your options are at this point to create a different copy of the life bonus ability for every hp increase, index them in an array at the start of your trigger and point the level to the array index. Yeah with a hundred levels your better off making a new spell sucks.

The other option is to use one of the passive ability systems that exists to add hp to a unit. That will require some knowledge of jass to understand but most of it should be doable with just custom scripts. For instance Cohadar's bonus system can add any amount of hp.

Either way good luck to you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top