I want to get the damage from a units weapon, or ability so I can display it in a dialog, but I can't figure out how you could get the damage from a weapons effect, let alone what weapon the unit is using.
you can retrieve the weapon using the: Unit Weapon function.
you can then use that value in an annoying sequence of catalog functions to retrieve the damage.
example:
A zealot uses the weapon Psi-blades(??) which has an effect (period 0.1, 2 periods) which then has the damage effect (8 dmg)
A Dark Templar uses a weapon Psi-Weapon (forgot name :P) which has a damage effect (18 dmg?)
overall:
A zealot does 16 dmg because it has an effect that makes it attack twice while a Dark Templar does 18 dmg with a single attack.
A result is that weapon dmg upgrade for a zealot changes the value for each attack by 1, so for a total of 18 dmg instead of 16 dmg, while a Dark Templar only gets an increase of 1 so it will go from 18 dmg to 19 dmg.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to get the damage from a units weapon, or ability so I can display it in a dialog, but I can't figure out how you could get the damage from a weapons effect, let alone what weapon the unit is using.
Hoping someone has an idea, thanks.
@StedNark: Go
you can retrieve the weapon using the: Unit Weapon function.
you can then use that value in an annoying sequence of catalog functions to retrieve the damage.
example:
A zealot uses the weapon Psi-blades(??) which has an effect (period 0.1, 2 periods) which then has the damage effect (8 dmg)
A Dark Templar uses a weapon Psi-Weapon (forgot name :P) which has a damage effect (18 dmg?)
overall:
A zealot does 16 dmg because it has an effect that makes it attack twice while a Dark Templar does 18 dmg with a single attack.
A result is that weapon dmg upgrade for a zealot changes the value for each attack by 1, so for a total of 18 dmg instead of 16 dmg, while a Dark Templar only gets an increase of 1 so it will go from 18 dmg to 19 dmg.