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

BlzSetUnitWeaponIntegerField UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE [reforged]

Do you think this should work?..
It does not seem to work. Attack does not change.

Code:
call BlzSetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE, 0, BlzGetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_BASE, 0) + 1)
call BlzSetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE, 0, BlzGetUnitWeaponIntegerField(u, UNIT_WEAPON_IF_ATTACK_DAMAGE_SIDES_PER_DIE, 0) - 1)
 
Level 29
Joined
Sep 26, 2009
Messages
2,596
Blizzard is inconsistent with their indexing. In this case, you need to specify index 1 for Attack1, not index 0.
Also, these actions for some reason work in additive manner.
So for example having Footman with 11 base damage, 1 number of dice and 2 sides per die, and using these actions:
  • Unit - Set Unit: Footman's Weapon Integer Field: Attack Damage Base ('ua1b')at Index:1 to Value: 50
  • Unit - Set Unit: Footman's Weapon Integer Field: Attack Damage Sides Per Die ('ua1s')at Index:1 to Value: 5
will result in 61 base damage, 1 number of dice and 7 sides per die...
 
Top