Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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
InvisForEnemies

Events


Unit - A unit Learns a skill

Conditions


(Learned Hero Skill) Equal to Evasion

Actions


Custom script: if not IsUnitAlly(GetTriggerUnit(), GetLocalPlayer()) then


Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with (25.00 x (Real((Level of Evasion for (Triggering unit)))))% transparency


Custom script: 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...![]()
Init

Events


Map initialization

Conditions

Actions


Unit - Grant shared vision of Demon Hunter 0000 <gen> to Player 1 (Red)


Wait 5.00 seconds


Hero - Learn skill for Demon Hunter 0000 <gen>: Evasion
Fade

Events


Unit - A unit Learns a skill

Conditions


(Triggering unit) Equal to Demon Hunter 0000 <gen>

Actions


Custom script: if not IsUnitAlly(GetTriggerUnit(), GetLocalPlayer()) then


Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 75.00% transparency


Custom script: endif


-------- the next part is to check if it resets after dying, which it didnt! --------


Wait 5.00 seconds


Unit - Kill (Triggering unit)


Wait 5.00 seconds


Hero - Instantly revive (Triggering unit) at (Center of (Playable map area)), Show revival graphics
