Cohadar
master of fugue
- Reaction score
- 209
set Damage = BinaryBonus.create('A8T0', 12, 5)
(0,1,2,...11) = 12 total
(0,1,2,...11) = 12 total
set Damage = BinaryBonus.create('A8T0', 12, 5)
(0,1,2,...11) = 12 total
//! external ObjectMerger w3a AItg A8T8 anam "Bonus Damage" Iatt 1 1280 ansf "(binary 8)"
//! external ObjectMerger w3a AItg A8T9 anam "Bonus Damage" Iatt 1 2560 ansf "(binary 9)"
//! external ObjectMerger w3a AItg A8T: anam "Bonus Damage" Iatt 1 5120 ansf "(binary <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />"
//! external ObjectMerger w3a AItg A8T; anam "Bonus Damage" Iatt 1 10240 ansf "(binary <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />"
//! external ObjectMerger w3a AItg A8T< anam "Bonus Damage" Iatt 1 20480 ansf "(binary <)"
set Damage = BinaryBonus.create(039;A8T0039;, 13, 5)
Maybe it's not good enough to make a increase max life aura.>.<
Can you teach me how to make a increase max life aura
Or you could just use UAC (see my sig), and add the bonus in the UnitEnter method, and remove it in the UnitLeave method.Base it off an already existing aura (maybe brilliance aura), then every every X seconds check for units with that aura, or unit within X distance of the aura unit, if the units have the buff or are in range, then add the max life ability to them, else remove the ability.
Hmm... Could this also be used to add attack range in-game? Just asking...
Do abilities with 100 levels really take up that much memory/cause lag/load slowly?
Yes.
Ability with 100 levels is like 100 1-level abilities.
And I mean this literally, wc3 does not do any optimization for multilevel abilities, they are basically a 1-level abilities stored in the record one after another.
TRY:
make an empty map,
put one unit in the middle,
make some 100-level ability,
give that ability to the preplaced unit,
see how long it takes for map to load.
constant function MaxStateModifierId takes unitstate u returns integer
if u == UNIT_STATE_MAX_LIFE then
return 039;A007039; // Rawcode of the Max Life Modifier ability.
elseif u == UNIT_STATE_MAX_MANA then
return 039;A008039; // Rawcode of the Max Mana Modifier ability.
endif
return 0
endfunction
function SetUnitMaxState takes unit whichUnit, unitstate whichUnitState, integer newVal returns boolean
local integer c = newVal-R2I(GetUnitState(whichUnit, whichUnitState))
local integer i = MaxStateModifierId(whichUnitState)
if i == 0 then
return false
endif
if c > 0 then
loop
exitwhen c == 0
call UnitAddAbility(whichUnit, i)
if c >= 100 then
set c = c - 100
call SetUnitAbilityLevel(whichUnit, i, 4)
elseif c >= 10 then
set c = c - 10
call SetUnitAbilityLevel(whichUnit, i, 3)
else
set c = c - 1
call SetUnitAbilityLevel(whichUnit, i, 2)
endif
call UnitRemoveAbility(whichUnit, i)
endloop
elseif c < 0 then
set c = -c
loop
exitwhen c == 0
call UnitAddAbility(whichUnit, i)
if c >= 100 then
set c = c - 100
call SetUnitAbilityLevel(whichUnit, i, 7)
elseif c >= 10 then
set c = c - 10
call SetUnitAbilityLevel(whichUnit, i, 6)
else
set c = c - 1
call SetUnitAbilityLevel(whichUnit, i, 5)
endif
call UnitRemoveAbility(whichUnit, i)
endloop
endif
return true
endfunction
Simply make some BJ function for yourself:Finally, I don't like the inability to Bonus_Life[<unit>] - 40 to simply subtract 40 hitpoints. You have to do the round about way of set Bonus_Life[<unit>] = Bonus_Life[<unit>] - 40. This is annoying as hell for something so simple.
Simply make some BJ function for yourself: