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 fh=BlzGetOriginFrame(ORIGIN_FRAME_HERO_HP_BAR, 0)
BlzFrameSetAlpha(fh, 0)
fh=BlzGetOriginFrame(ORIGIN_FRAME_HERO_MANA_BAR, 0)
BlzFrameSetAlpha(fh, 0)
That's exactly what I'm aiming for. It will essentially serve a purpose of an on-screen button. Hero will get deselected and removed right after selecting. I just need to get rid of these bars because it's distracting and even if hero has near no health, the bar is full black.Maybe you can instead use a dummy hero icon with a fake health and mana value.
Custom Script, as Macadamia mentioned aboveI don't think I use any jass, Macadamia. Could you hand me a link to good tutorial how to set up Lua into map? Kind of a newbee on that stuff.
Lua test

Events


Map initialization

Conditions

Actions


Custom script: GameStart()
function FirstTrigger()
local message="Hello Lua World"
local hello=CreateTrigger()
TriggerRegisterUnitEvent(hello, Hero, EVENT_UNIT_SPELL_EFFECT)
TriggerAddCondition(hello, Condition(function()
if (GetSpellAbilityId()==FourCC("AHds")) then
return true
else
return false
end
end))
TriggerAddAction(hello, function()
print(message)
end)
end
function GameStart()
Hero=CreateUnit(Player(0), FourCC("Hpal"), GetStartLocationX(0), GetStartLocationY(0), 270.0)
SetHeroXP(Hero, 1000, false)
TimerStart(CreateTimer(), 5.0, false, FirstTrigger)
end
You should stop using GUI, because it is shitty and productivity is poor
Just to give a preview of what's coming next, I've been searching around for other Damage libraries to write compatibility scripts for and - while I've been mostly successfuly - there are a few features that don't work.
1) I will be adding a Damage.enabled "variable" which will actually disable both damage event triggers when set to True and re-enable them when set to False. This will not interrupt the ongoing damage but will ensure the subsequent damage is ignored.
2) I will be adding an ability to un-register triggers (for whoever thinks that's a good idea)
3) I will be adding some more syntax sugar so you don't have to use Damage.index.source/target/amount and can just use Damage.source/target/amount if you want.
And one final mention, I've noticed an interesting feature that's gaining a bit of popularity, and that is to have embedded conditions into the damage library and have branching events off of those. Now this would normally be incredibly difficult to pull off in GUI with so many different events already in the system (DamageModifierEvent, DamageEvent, etc.) so what will I do? Make this a vJass-specific feature...
JUST KIDDING!
I love GUI and would never abandon it! Thanks to the magic of how DamageEngine hooks the GUI events, I bring to you this:
JASS:EQUAL // Any damage type permitted (no change to your code needed, it will work as it always has) NOT_EQUAL // Same as including IsDamageCode Equal to True GREATER_THAN // Same as including IsDamageSpell Equal to True LESS_THAN // Same as including IsDamageAttack Equal to True GREATER_THAN_OR_EQUAL // Same as including IsDamageRanged Equal to True LESS_THAN_OR_EQUAL // Same as including IsDamageMelee Equal to True
This will provide syntax like:
Spell Damage Detector
Events
Game - DamageModifierEvent becomes Greater than 1
Conditions
-------- No conditions needed if IsDamageSpell was your only condition --------
Actions
See you guys in the near future with Damage Engine 5.7.0.0 !
Melee Damage Detector
Events
Game - DamageEvent becomes Less than or Equal to 1
Conditions
-------- No conditions needed if IsDamageMelee was your only condition --------
Actions
function UnitRemoveAbilityBJ takes integer abilityId, unit whichUnit returns boolean
return UnitRemoveAbility(whichUnit, abilityId)
endfunction
Custom script: UnitRemoveAbility( udg_Unit , FourCC("'Aloc"))
