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

Upgrading an Ability

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
Like this?
206543-albums5871-picture62119.png
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Legendary: Ure misunderstanding him. He already knew how to make an ability which have 100 level.
His problem is how to level up it with a system that doesnt make the loading longer.
En Tropy: What kind of ability u are making?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
why not use item abilities for this?
  • Untitled Trigger 004
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • ((Owner of (Killing unit)) controller) Equal to User
    • Actions
      • Hero - Create Tome of Strength +2 and give it to (Killing unit)
or more complicated?
also instead ability u can use upgrades just set it to lv100
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
shadowvzs: We dont know what effect his ability does. Ur trigger worked when he wants the hero to increase STR each time he kills an enemy. I think his ability is more complicated than that.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
shadowvzs: We dont know what effect his ability does. Ur trigger worked when he wants the hero to increase STR each time he kills an enemy. I think his ability is more complicated than that.

idk if it was too complicated or now because he said "that could strengthen the unit"

and what i wrote was example because this way u can add more thing too, like dmg/hp/mp regen or any boost
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
btw it increases armor and damage.. i think there's a damage tome but the armor?

there's no damage tome as well as armor tome. there's Agility, Intelligence, Strength, Experience, and Health tome. You could use Strength as Damage, Agility as Armor, and Intelligence as MP. It's not an accurate boosting though like Agility will add attack and movespeed too.
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
btw it increases armor and damage.. i think there's a damage tome but the armor?

maybe make dummy armor abilities (item armor ability based) in hidden spellbook (put to spellbook then disable the spellbook so unit got the pasive abilities from spellbook just cant see the spellbook icon)

examplke do 4 armor ability and all with lv10:
1. armor ability:lv1 = 0 armor, lv2 = 1 armor ....lv10 = 9 armor
2. armor ability:lv1 = 10 armor, lv2 = 20 armor ....lv10 = 90 armor
3. armor ability:lv1 = 100 armor, lv2 = 200 armor ....lv10 = 900 armor
4. armor ability:lv1 = 1000 armor, lv2 = 2000 armor ....lv10 = 9000 armor

(limit is 9999 armor if 4 ability and each got only lv10)

then set the abilities level to that much how much armor u want (exactly same with damage/attack speed etc, exclude hp/mp where have different trick) :p

lets say u need 2234 armor
then set 4th skill to lv2 (=+2000armor),3rd skill to 2(=+200armor), 2nd skill to lv3(=+30armor) and 1st skill to lv1(=+4armor)

easy to do it just keep tracking how much ur kill, example u killed 1250 creep so
(so look like kill_Count[player number of killing unit] = 1250)

//we use 2 integer for be more easy, this integer variable in my example is ''i'' and b
set b = kill_Count[player number of killing unit] // so we save how much killed to b
set killing unit armor4 ability level to (b/1000)
set i = b-((b/1000)*1000)/100 //this is same than modulator (b,1000)
set killing unit armor3 ability level to (i)
set i = (i- ((i/100)*100))/10
set killing unit armor2 ability level to (i)
set i =( i- ((i/10)*10))/1
set killing unit armor1 ability level to (i)
 
Last edited:
Level 12
Joined
Sep 11, 2011
Messages
1,176
set b = kill_Count[player number of killing unit] // so we save how much killed to b
set killing unit armor4 ability level to (b/1000)
set i = b-((b/1000)*1000) //this is same than modulator (b,1000)

i don't get this, please explain.

if we kill 1100 units then

1100/1000 = 1,1 (rounded to 1)

i = b-((b/1000)*1000)
i = 1100-((1100/1000)*1000)
i = 1100 -((1)*1000)
i = 1100 - 1000
i = 100
set killing unit armor3 ability level to (i)

so the armor3 level will be set to 100 ?

or am i wrong ?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
i don't get this, please explain.

if we kill 1100 units then

1100/1000 = 1,1 (rounded to 1)

i = b-((b/1000)*1000)
i = 1100-((1100/1000)*1000)
i = 1100 -((1)*1000)
i = 1100 - 1000
i = 100
set killing unit armor3 ability level to (i)

so the armor3 level will be set to 100 ?

or am i wrong ?

sorry i forget dive it at end, my mistake

4th 1100/1000 = 1
so 3rd will be 100 / 100 = 1

check that post now, i fixed

here my jass function what handle the attack speed and damage setting
JASS:
function AddDMG takes boolean DMG, unit u returns nothing
    local integer i
    local integer n
    local integer a1
    local integer a2
    local integer a3
    local integer a4
    local integer p = GetPlayerId( GetOwningPlayer( u ) ) + 1

//if not damage then it set the attack speed abilties what is ability[14-16]
//if damage then it set the attack damage abilties what is ability[17-20]
    if not DMG then
        set a1 = udg_Abilities2[14]
        set a2 = udg_Abilities2[15]
        set a3 = udg_Abilities2[16]
        set i =  *new attack speed*
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    else
        set a1 = udg_Abilities2[17]
        set a2 = udg_Abilities2[18]
        set a3 = udg_Abilities2[19]
        set a4 = udg_Abilities2[20]
        set i = *new damage*
        set n = i / 1000 + 1
        call SetUnitAbilityLevel( u, a4, n )
        set i = i - ( i / 1000 ) * 1000
        set n = i / 100 + 1
        call SetUnitAbilityLevel( u, a3, n )
        set i = i - ( i / 100 ) * 100
        set n = i / 10 + 1
        call SetUnitAbilityLevel( u, a2, n )
        set i = i - ( i / 10 ) * 10
        set n = i + 1
        call SetUnitAbilityLevel( u, a1, n )
    endif
endfunction
 
Status
Not open for further replies.
Top