• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How do I change the attack damage?

Status
Not open for further replies.
create custom abilities based on Item Damage Bonus and add it to your unit

if you want to change the damage seamlessly you will have to create abilities with values 1 2 4 8 16 32 64 and so on because you can sum up any value with these by adding the right abilities
Examples:
15 = 8 + 4 + 2 + 1
23 = 16 + 4 + 2 + 1

make abilites and save them:
ability[0] = +1 dmg
ability[1] = +2 dmg
ability[2] = +4 dmg
ability[3] = +8 dmg
ability[4] = +16 dmg

you calculate it like this:
Bonus = 23
counter = 4

if 2^counter >= bonus
add ability[counter]
set bonus = bonus - 2^counter
set counter = counter - 1


if 2^counter >= bonus
add ability[counter]
set bonus = bonus - 2^counter
set counter = counter - 1

and so on.....
 
Status
Not open for further replies.
Back
Top