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!
for what u want use it?
coz like was upgrades isnt decreaseable but in few case unit techtree requiment also could be solution
make weapon abilties unit depend?
u could make unit type at techtree requiment
i use it for make abilties class depend, lets say for 7 weapon, need 7 dummy unit and at abilties i make that dummy unit requiment, if u want make ability unusable then kill dummy unit and create another (example if u change bow to axe then kill bow dummy unit and create axe dummy unit).
(Unit name appear at ability requiment so unit name must be that text what u want show like requiment)
this work only if u need for few thing, so isnt complex thing coz could be sucks when in complex thing u create 100unit only for make something useable/unuseable.
you cant reset an upgrade but there is some walkarounds for example.
Upgrade 1: gives 2 more armor to all footmans
Upgrade 2: decrease teh armor by 2
you you use those two to set the armor back to 0 you simply set upgarde 2 to lvl 1
Darkgrom, that transition can only occur a finite number of times before all levels are depleted. It is impractile to set the upgrades to large values of levels due to the loading time impact it would have on the map.
What I was trying to do is use an upgrade to increase/decrease the damage of a hero in my map depending on what weapon he is using. So if he equips a sword that does 10 damage, his research level for damage is set to 10, but if he unequips it and then equips a sword that does 5 damage, his research level for damage is set to 5
What I was trying to do is use an upgrade to increase/decrease the damage of a hero in my map depending on what weapon he is using. So if he equips a sword that does 10 damage, his research level for damage is set to 10, but if he unequips it and then equips a sword that does 5 damage, his research level for damage is set to 5
then better if u add ability and increase decrease it
udg_Abilities2[14]=custom ability based on item glove of haste, 10 lv, lv1=0, lv2=0.01...lv10=0.09
udg_Abilities2[15]=custom ability based on item glove of haste, 10 lv, lv1=0, lv2=0.1...lv10=0.9
udg_Abilities2[16]=custom ability based on item glove of haste, 10 lv, lv1=0, lv2=1...lv10=9
udg_Abilities2[17]=custom ability based on item claw of attack, 10 lv, lv1=0, lv2=1...lv10=9
udg_Abilities2[18]=custom ability based on item claw of attack, 10 lv, lv1=0, lv2=10...lv10=90
udg_Abilities2[19]=custom ability based on item claw of attack, 10 lv, lv1=0, lv2=100...lv10=900
udg_Abilities2[20]=custom ability based on item claw of attack, 10 lv, lv1=0, lv2=1000...lv10=9000
in game just use this
Set Stat_Dmg[player number of triggering player] = (Stat_Dmg[player number of triggering player] + *new item damage* - *old item damage*)
Set Stat_AttSpeed[player number of triggering player] = (Stat_AttSpeed[player number of triggering player] + *new item speed* - *old item speed*)
for dmg=Custom script: call AddDMG(true, *unit*)
for speed=Custom script: call AddDMG(false, *unit*)
u can copy jass to map header
JASS:
//damage and attack speed setting
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 = GetConvertedPlayerId(GetOwningPlayer(u))
if ( DMG == false ) then
set a1 = udg_Abilities2[14]
set a2 = udg_Abilities2[15]
set a3 = udg_Abilities2[16]
set i = udg_Stat_AttackSpeed
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 = udg_Stat_Dmg
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
set u = null
endfunction
Modify item ability (100 levels will do).
Each level add +1 damage (level 69 will add +69 damage).
Unit pick or drop item, just increase or reduce ability level.
Modify item ability (100 levels will do).
Each level add +1 damage (level 69 will add +69 damage).
Unit pick or drop item, just increase or reduce ability level.
if no equiped item then level 0?
i think atleast need 2-3 ability coz isnt much that +100 damage anyway its map depend of course just i think need more and could be just lv10 then, or aint better 4 ability with 10lv than 2 with 100lv?
(i think damage could be saved to variable then set it to more variable, example 1100 damage, if x > 1000 then ability4 level = mod (x,1000)+1 if ability at lv1 give 0 dmg and same routine for 0-900, 0-99, 0-9 abilities)
Well you can have ability that will go from 1 to 10 (level 11 can give 0 damage)
Another one that will go from 10 to 100 (10/20/30...) (level 11 can give 0 damage)
Another one from 100 to 1000 (100/200/300...) (level 11 can give 0 damage)
....
and then just add all 3 abilities to unit.
When unit pick item then just for 2350 damage
Set Ability 4 to level 2 (2000)
Set Ability 3 to level 3 (300)
Set Ability 2 to level 5 (50)
Set Ability 1 to level 11 (0)
=
2000 + 300 + 50 + 0 = 2350
Use hashtables to setup values for each item (gosh I should create system for this ^_^)
// Your hash, item raw code, ability1, ability level
I already made the fullscreen inventory system from scratch, and it was fully functional with the upgrades the only thing was i couldnt decrease them... and it is kinda obvious how to make the system using abilities.... i was just asking about the upgrades because it would be a hell of a lot more efficient.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.