Name | Type | is_array | initial_value |
AncientForestRegions | rect | Yes | |
ang | real | No | |
AoE | location | No | |
ArcaneIsCasting | boolean | No | |
ArcaneMissileCaster | unit | Yes | |
ArcaneMissilesDummyCaster | unit | Yes | |
ArchMage | unit | No | |
Bandit_Leader_Kill | integer | No | |
Bandit_Scrolls_Collected | integer | No | |
BarrensRegions | rect | Yes | |
BFG_Error | boolean | Yes | |
BFG_Target_Area | location | Yes | |
BooM | unit | No | |
BreakingGround | effect | No | |
caster | unit | Yes | |
Caster_ThunderStorm | unit | No | |
CCCaster | unit | No | |
ChancetoBreak | integer | No | |
ChaosDummyCaster | unit | Yes | |
ChaosOverload | boolean | No | |
CrystalCannonDummyCaster | unit | No | |
CrystalIsCasting | boolean | No | |
CrystalOrb | unit | No | |
damage | real | No | |
Dust_int | integer | No | |
EarthCaster | unit | No | |
EarthGraspCaster | unit | Yes | |
EarthTar | unit | No | |
Effect1 | effect | No | |
Effect2 | effect | No | |
Effect3 | effect | No | |
FireballCaster | unit | Yes | |
FireballDummyCaster | unit | No | |
FireballPoint | location | No | |
FireIsCasting | boolean | No | |
FirePrison_Check | boolean | Yes | |
FirePrisonAngle | integer | Yes | |
FirePrisonCaster | unit | No | |
FirePrisonPositionX | real | No | |
FirePrisonPositionY | real | No | |
Flame | unit | Yes | |
Flying_unit | group | No | |
ForestRegions | rect | Yes | |
FrostboltCaster | unit | Yes | |
FrostboltPoint | location | No | |
FrostDummyCaster | unit | No | |
FrostIsCasting | boolean | No | |
Fury | integervar | Yes | |
Gate_Ang | real | No | |
GatePoint | location | Yes | |
HellfireDummyCaster | unit | Yes | |
Help_Request_Accquired | integer | No | |
Hero_Special_Attached_Fx | effect | Yes | |
Heroes | unit | Yes | |
HeroesSound | sound | Yes | |
HeroIsStealthed | boolean | Yes | |
House | unit | Yes | |
HumanPlayers | force | No | |
HumanPlayersAndAllies | force | No | |
HydroBombCaster | unit | Yes | |
HydroIsCasting | boolean | No | |
HydroKnock | real | No | |
HydroKnock_Ang | real | No | |
HydroKnocked_unit | unit | No | |
HydroKnocked_units | group | No | |
HydroPoint | location | No | |
IslandsRegions | rect | Yes | |
Item_Images | group | No | |
Item_User | unit | No | |
Knock | real | No | |
Knock_Ang | real | No | |
Knocked_unit | unit | No | |
LightIsCasting | boolean | No | |
LightningBoltCaster | unit | Yes | |
LightningboltDummyCaster | unit | No | |
LightningboltDummyCaster2 | unit | No | |
LightningGroup | group | No | |
LightningIsCasting | boolean | No | |
Mad_Area | rect | No | |
MainQuests | quest | Yes | |
MonstersTimer | timer | Yes | |
MountainsRegions | rect | Yes | |
move | real | No | |
NagaIslandRegions | rect | Yes | |
obj | gamecache | No | |
Oblivion_Rock_Chunks | destructable | Yes | |
PatrolsEnabled | boolean | No | |
pheonix | unit | No | |
Pillar | unit | No | |
Pillar_Size | real | No | |
Player_Unit_Heroes | unit | Yes | |
PlayerColorStrings | string | Yes | |
PlayerKills | integer | Yes | |
Quicksand_Caster | unit | No | |
Quicksand_Stones | effect | No | |
Quicksand_Vortex | effect | No | |
RandomEnemyHero_Lightning | unit | No | |
RandomEnemyUnit_Lightning | unit | No | |
RandomEnemyUnit_Lightning2 | unit | No | |
ringstop | real | No | |
Ripple | unit | No | |
Rockinhand | effect | No | |
RockTar | unit | No | |
RockTosser | unit | No | |
ShacklesIsChanneling | boolean | No | true |
ShacklesLightning | unit | No | |
Shadow_Gate | group | Yes | |
ShadowboltCaster | unit | Yes | |
ShadowboltDummyCaster | unit | No | |
ShadowIsCasting | boolean | No | |
ShadowWord | unit | Yes | |
ShadowWordCaster | unit | No | |
ShadowWordTarget | unit | No | |
ShotgunTargetTemp | location | No | |
Silencer | unit | No | |
SmiteCaster | unit | No | |
SmiteDummyCaster | unit | No | |
SmiteDummyCaster2 | unit | No | |
SpawnRegions | rect | Yes | |
SpecialEffect | effect | Yes | |
SpellPoint | unit | Yes | |
Stomp_Location | location | No | |
Stomper | unit | No | |
Tantalize_Caster | unit | No | |
Tantalize_Target | unit | No | |
target | unit | No | |
targetpoint | rect | No | |
TempPoint | location | No | |
ThunderStomHeroAround | boolean | No | |
ThunderStormHeroAround | boolean | No | |
ThunderStormRectState | boolean | No | |
TimeButtons | button | Yes | |
TimeSelection | dialog | No | |
TimeTimer | timer | No | |
TorrentDummyCaster | unit | No | |
TorrentPoint | location | No | |
Tremor_Caster | unit | No | |
Tremor_Counter | integer | No | |
Tremor_Damage | group | No | |
Tremor_Effect | unit | No | |
Tremor_Special_Effect | effect | Yes | |
Wave_Angls | real | No | |
Wave_Points | location | No |
///////////////////////////////////////////////////////////////////////////////
// Display Damage System Resource Material //
// Editable - Yes, suggested //
///////////////////////////////////////////////////////////////////////////////
function KDDS_GetTextSize takes nothing returns real
return 8.0 // The text size of the floating text.
endfunction
function KDDS_GetZOffset takes nothing returns real
return 0.0 // The z offset if the floating text.
endfunction
function KDDS_GetLifeSpan takes nothing returns real
return 1.5 // The life span of the floating text.
endfunction
function KDDS_GetFadeTime takes nothing returns real
return 0.0 // The fade time of the floating text.
endfunction
function KDDS_GetVelocity takes nothing returns real
return 92.0 // The velocity of the floating text.
endfunction
function KDDS_GetVelocityAngle takes nothing returns real
return 90.0// The velocity angle of the floating text.
endfunction
function KDDS_GetPlayerColourString takes integer i returns string
local playercolor pc = GetPlayerColor(Player(i))
local string s
if pc == PLAYER_COLOR_RED then
set s = "|cffFF0000"
elseif pc == PLAYER_COLOR_BLUE then
set s = "|cff0000FF"
elseif pc == PLAYER_COLOR_CYAN then
set s = "|cff00FFFF"
elseif pc == PLAYER_COLOR_PURPLE then
set s = "|cff800080"
elseif pc == PLAYER_COLOR_YELLOW then
set s = "|cffFFFF00"
elseif pc == PLAYER_COLOR_ORANGE then
set s = "|cffFF8000"
elseif pc == PLAYER_COLOR_GREEN then
set s = "|cff00FF00"
elseif pc == PLAYER_COLOR_PINK then
set s = "|cffFF80C0"
elseif pc == PLAYER_COLOR_LIGHT_GRAY then
set s = "|cffC0C0C0"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff8080FF"
elseif pc == PLAYER_COLOR_AQUA then
set s = "|cff008040"
elseif pc == PLAYER_COLOR_LIGHT_BLUE then
set s = "|cff804000"
else
set s = "|cff808080"
endif
set pc = null
return s
endfunction
///////////////////////////////////////////////////////////////////////////////
// Display Damage System Code //
// Editable - No, not suggested //
///////////////////////////////////////////////////////////////////////////////
function KDDS_Display takes nothing returns nothing
local unit u = GetTriggerUnit()
local real d = GetEventDamage()
local integer p = GetPlayerId(GetOwningPlayer(GetEventDamageSource()))
local string c = KDDS_GetPlayerColourString(p)
local texttag t
call CreateTextTagUnitBJ(c+I2S(R2I(d))+"|r",u, KDDS_GetZOffset(),KDDS_GetTextSize(), 100, 100, 100, 0 )
set t = GetLastCreatedTextTag()
call SetTextTagPermanentBJ( t, false )
call SetTextTagLifespanBJ( t, KDDS_GetLifeSpan() )
call SetTextTagFadepointBJ( t, KDDS_GetFadeTime() )
call SetTextTagVelocityBJ( t, KDDS_GetVelocity(), KDDS_GetVelocityAngle() )
set u = null
set d = 0
set p = 0
set c = ""
set t = null
endfunction
function KDDS_RegisterUnit takes unit u returns nothing
call TriggerRegisterUnitEvent( gg_trg_Display_Damage_System, u, EVENT_UNIT_DAMAGED )
endfunction
function KDDS_SetUp takes nothing returns nothing
local group g = CreateGroup()
local unit u
set g = GetUnitsInRectAll(GetPlayableMapRect())
loop
set u = FirstOfGroup(g)
exitwhen u == null
call KDDS_RegisterUnit(u)
call GroupRemoveUnit(g, u)
endloop
set g = null
endfunction
///////////////////////////////////////////////////////////////////////////////
// End of Display Damage System Code //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Trigger Code //
///////////////////////////////////////////////////////////////////////////////
//===========================================================================
function InitTrig_Display_Damage_System takes nothing returns nothing
set gg_trg_Display_Damage_System = CreateTrigger( )
call TriggerAddAction( gg_trg_Display_Damage_System, function KDDS_Display )
call KDDS_SetUp()
endfunction