Last active
August 29, 2015 14:13
-
-
Save nefftd/ff4736c868a5b48ae32a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mod:provider 'health' { | |
| function(unit, event, ...) | |
| if some_example then | |
| return -- return nothing to not update frames | |
| end | |
| return UnitHealth(unit), UnitHealthMax(unit) -- returned values get sent as signal to unit frame | |
| end, | |
| updatefor = {'.*'}, -- invoke for all units | |
| unitevents = {'UNIT_HEALTH','UNIT_MAXHEALTH'}, -- invoke for event's arg1 unit on these events | |
| events = { ['.*'] = 'PLAYER_ENTERING_WORLD' }, -- also invoke on PEW for all valid units | |
| timers = { ['player'] = .1 }, -- also invoke every .1 sec for player | |
| resolve = true, -- also invoke immediately when unit changes | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment