local unit hero = GetLevelingUnit()
local player player_local = GetLocalPlayer()
local integer abil_lvl = GetUnitAbilityLevel(hero, <ability>)
if (IsUnitAlly(hero, player_local)) then
// SetUnitVertexColor(unit, red,green,blue, alpha)
call SetUnitVertexColor(hero, 255,255,255, 255)
else
// SetUnitVertexColor(unit, red,green,blue, alpha)
call SetUnitVertexColor(hero, 255,255,255, 255 - (64 * abil_lvl))
// Each level provides 25%(255/64 = ~25%) transparency to enemies.
endif
Hmm ok thanks, but what if my hero dies? His transparency will be reseted..?
no... it will maintain its faded appearance.Hmm ok thanks, but what if my hero dies? His transparency will be reseted..?
then you did something wrong. These are my test triggers and they all worked properly.The trigger is learns a skill and when my hero will revive the skill will already be learned... Btw i think that this think is bugged or something... I cr8ed an enemy force player 2 and i gave the skill to the hero and then changed its lvl to 4 and still didn't gave transparency.. Rly i need to test it multiplayer because singleplayer sux and doesn't work... Btw tnx for all your help, Eccho i will give u +rep for the help...