//==============================================================================
// TDHT - Library for The Demon Hunt Tournament by SanKakU -
//==============================================================================
// THANKS TO : TEXT TAG - Floating text system by Cohadar - v4.0
// I was able to learn how to make a library from examining that simple system
//==============================================================================
// This particular system accomplishes a few things.
// * allows slightly faster map initial loading time because less triggers are
// registered.
// * allows time to be saved while adding new triggers.
// to use: call RUNNERPUE(nameoftrigger, thekindofevent) and that's it.
// you can make your own teams from any combination of colors and edit the
// functions like that. like if you had a map with teams just like dota,
// then you can make a function like SENTINELPUE and Player(1,2,3,4,5) and
// SCOURGEPUE Player(7,8,9,10,11) instead of RUNNERPUE and CHASERPUE and
// instead of Player(2,3,4,5,6,7,8,9,11) and Player(0,1,10)
// if you allow things like all pick then this won't work for spell triggers.
// but it might still be useful for things like giving gold to enemy team of
// a dying tower or hero or something like that.
//==============================================================================
library TDHT
globals
endglobals
function FilterDebug takes nothing returns boolean
return true
endfunction
//
public function RUNNERPUE takes trigger trig, playerunitevent whichPlayerUnitEvent returns nothing
call TriggerRegisterPlayerUnitEvent( trig, Player(2),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(3),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(4),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(5),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(6),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(7),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(8),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(9),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(11),whichPlayerUnitEvent, Filter(function FilterDebug) )
endfunction
//
public function CHASERPUE takes trigger trig, playerunitevent whichPlayerUnitEvent returns nothing
call TriggerRegisterPlayerUnitEvent( trig, Player(0),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(1),whichPlayerUnitEvent, Filter(function FilterDebug) )
call TriggerRegisterPlayerUnitEvent( trig, Player(10),whichPlayerUnitEvent, Filter(function FilterDebug) )
endfunction
endlibrary