Name | Type | is_array | initial_value |
AITempPos1 | location | No | |
AITempPos2 | location | No | |
AITempPos3 | location | No | |
animals_noExit_moveTo | location | No | |
AttackLeftPos1 | location | No | |
AttackMainPos | location | No | |
AttackMiddlePos1 | location | No | |
AttackRightPos1 | location | No | |
BBigUnitTimer | timer | No | |
BHealerUnitTimer | timer | No | |
BlackM_tmp | location | No | |
BlackM_unit | unit | No | |
blackout_region | fogmodifier | Yes | |
Blight_MutatedG_point | location | No | |
Blight_MutatedG_uGroup | group | No | |
BMedUnitTimer | timer | No | |
BoombooDeath_Cloud | unit | No | |
BoombooDeath_point | location | No | |
BoombooDeath_uGroup | group | No | |
Boss1 | unit | No | |
Boss2 | unit | No | |
Boss3 | unit | No | |
BossBoombooINT | integer | No | |
BossLichINT | integer | No | |
BossMannorothINT | integer | No | |
BossTempPos | location | No | |
BReviveTempPos | location | No | |
BUnitFloatingText | texttag | Yes | |
camDistance | real | No | |
ChieftainINT | integer | No | |
ChieftainQ_DMG_setAmount | real | No | |
ChieftainQ_INTelligence | integer | No | |
ChieftainQ_level | integer | No | |
ChieftainQgroup | group | No | |
ChieftainQpos | location | No | |
ChieftainRgroup | group | No | |
ChieftainRndINT | integer | No | |
ChieftainRpos | location | No | |
Cinematic_CaveTP_Pos | location | No | |
Cinematic_D4_hero | unit | No | |
Cinematic_Hero1 | unit | No | |
Cinematic_Hero2 | unit | No | |
Cinematic_tmp1 | location | No | |
Cinematic_tmp2_tp | location | No | |
Cinematic_UGroup | group | No | |
CinematicTempPos | location | No | |
Commander_QfaceAngle | real | No | |
Commander_Qgroup | group | Yes | |
Commander_Qpos | location | Yes | |
Commander_Qunit | unit | No | |
CommanderAGI | integer | No | |
CommanderQ_angle | real | No | |
CommanderQ_caster | unit | No | |
CommanderQ_casterPoint | location | No | |
CommanderQ_manaCheck | real | No | |
CommanderQ_manaCheck2 | real | No | |
CommanderQ_moveToPoint | location | No | |
CommanderQ_specialEff | effect | No | |
CommanderQ_targetPoint | location | No | |
CommanderQ_unitGroup | group | No | |
CommanderR_counter | integer | No | |
CommanderWpos | location | No | |
CP_HiddenItems | item | Yes | |
CP_HiddenItemsIndex | integer | No | |
CP_Item | item | No | |
CP_Point | location | No | |
CP_PointIsWalkable | boolean | No | |
CP_Rect | rect | No | |
DeadlyFartsBossUnit | unit | No | |
DeadlyFartsINT | integer | No | |
DeadlyFartsTempPos | location | No | |
DeadlyFartsTempPos2 | location | No | |
DeadlyFartsUnits | unit | Yes | |
DeadlyFartsZ1 | group | No | |
DeadlyFartsZ2 | group | No | |
DeadlyFartsZ3 | group | No | |
DeadlyFartsZ4 | group | No | |
DebuggItem | item | No | |
DebuggTimer | timer | No | |
EnemyBase_Units | group | No | |
FlameLichROF_INT | integer | No | |
FlameLichROF_TargetPos | location | No | |
FlameLichROF_TempPos | location | No | |
FlameLichTempPos | location | No | |
FlameLichUnitGroup | group | No | |
GDD__Integers | integer | Yes | |
GDD__LeftMapGroup | group | No | |
GDD__TriggerArray | trigger | Yes | |
GDD__UnitArray | unit | Yes | |
GDD_Damage | real | No | |
GDD_DamagedUnit | unit | No | |
GDD_DamageSource | unit | No | |
GDD_Event | real | No | |
Gronn_KeepOut_tmp | location | No | |
Gronn_KeepOut_tmp_Center | location | No | |
Gronn_Ping_tmp | location | No | |
gronn_tempPos | location | No | |
Gronn_tmp | location | No | |
HealersTempPos | location | No | |
Heroes | unit | Yes | |
HeroesCinematicPos | location | Yes | |
HeroesNames | string | Yes | |
IntroCinCount | integer | No | |
IntroCinSkipped | boolean | No | |
Item_AxeWrath_tempPos | location | No | |
Item_BladeMail_HPdmg | real | No | |
Item_BloodS_HPdmg | real | No | |
Item_BloodS_point | location | No | |
Item_BloodS_uGroup | group | No | |
Item_EarthO_string | string | Yes | |
Item_EmberBlade_Counter | integer | No | |
Item_EvasionC_agility | integer | No | |
Item_EvasionC_real | real | No | |
Item_HP_Pendant_without | real | No | |
Item_Legendary | item | Yes | |
Item_Legendary_Set | itemcode | Yes | |
Item_Limit | itemtype | Yes | |
Item_ManaO_mana | real | No | |
Item_MoF_agility | integer | No | |
Item_MoF_point | location | No | |
Item_MoF_uGroup | group | No | |
Item_MP_Pendant_without | real | No | |
Item_RageC_counter | integer | No | |
Item_RageC_DMG | integer | No | |
Item_RageC_item | item | No | |
Item_RageC_totalHP | real | No | |
Item_RageC_unit | unit | No | |
Leaderboard | leaderboard | No | |
Leaderboard_Counter | integer | No | |
LeftBigUnit | unit | No | |
LeftHealerUnit | unit | No | |
LeftMediumUnit | unit | No | |
LeftWaveSpawn | location | No | |
MannorothBlightWalk_tmp | location | No | |
MannorothROF_INT | integer | No | |
MannorothROF_TargetPos | location | No | |
MannorothROF_TempPos | location | No | |
MidBigUnit | unit | No | |
MiddleWaveSpawn | location | No | |
MidHealerUnit | unit | No | |
MidMediumUnit | unit | No | |
mode_1SP | boolean | No | |
mode_1SP_player | player | No | |
mode_2P_blue_orange | boolean | No | |
mode_2P_controlling_3rd_player | player | No | |
mode_2P_red_blue | boolean | No | |
mode_2P_red_orange | boolean | No | |
mode_2P_unused_hero | unit | No | |
mode_2P_unused_player | player | No | |
mode_3MP | boolean | No | |
mode_skipsRequired | integer | No | |
multiboard | multiboard | No | |
Multiboard_DMG | integer | Yes | |
multiboard_p1_kills | integer | No | |
multiboard_p2_kills | integer | No | |
multiboard_p3_kills | integer | No | |
Number_ENecromancer | integer | No | |
Number_Fatty_and_Golem | integer | No | |
Number_Infested | integer | No | |
Number_Infested_Mutated | integer | No | |
Number_Mutated | integer | No | |
OBigUnitTimer | timer | No | |
OHealerUnitTimer | timer | No | |
OMedUnitTimer | timer | No | |
OReviveTempPos | location | No | |
OUnitFloatingText | texttag | Yes | |
Outcome_2survive_hero | unit | Yes | |
PlayerColors | string | Yes | |
PlayerGroup_SPMP | force | No | |
pos_bottom_lane_temp | location | No | |
pos_middle_lane_temp | location | No | |
pos_upper_lane_temp | location | No | |
qs1_counterChecker | boolean | Yes | |
quest_easter_egg | quest | Yes | |
quest_gronn_reqs | questitem | Yes | |
quest_main | quest | No | |
quest_religionINT | integer | No | |
quest_side_1 | quest | No | |
quest_side_1_ping_pos | location | No | |
quest_side_1_req | questitem | Yes | |
quest_side_2 | quest | No | |
questSideUG | group | No | |
RageBoss3_Bool | integer | No | 0 |
RBigUnitTimer | timer | No | |
ReviveBool | boolean | No | |
RevivePos | location | No | |
ReviveSpecialEff | effect | No | |
ReviveTimer | timer | Yes | |
ReviveTimer_Window | timerdialog | Yes | |
RHealerUnitTimer | timer | No | |
RightBigUnit | unit | No | |
RightHealerUnit | unit | No | |
RightMediumUnit | unit | No | |
RightWaveSpawn | location | No | |
RMedUnitTimer | timer | No | |
RReviveTempPos | location | No | |
RUnitFloatingText | texttag | Yes | |
ShamanCurrentHP_real | real | No | |
ShamanE_DMG_setAmount | real | No | |
ShamanE_level | integer | No | |
ShamanE_rnd_INT | integer | No | |
ShamanE_STR_value | integer | No | |
ShamanE_W_point | location | No | |
ShamanEpos | location | No | |
ShamanQgroup | group | No | |
ShamanQpos | location | No | |
ShamanR_hp_STR | integer | No | |
ShamanR_SpecialEff | effect | No | |
ShamanRcounter | integer | No | |
ShamanSTR | integer | No | |
ShamanW_QcastDummyPos | location | No | |
ShamanW_SpecialEffect | effect | No | |
ShamanW_TargetPos | location | No | |
ShamanW_UnitPos | location | No | |
ShamanWboolean | boolean | No | |
ShamanWgroupDMG | group | No | |
ShamanWspirit | unit | No | |
taurens_cinematic_intro | unit | Yes | |
tempGroup | group | No | |
Text_Duration | real | No | |
TextSize_dmg | real | No | |
TextSize_spells | real | No | |
Timer30min | timer | No | |
Timer30Window | timerdialog | No | |
Timer5_Events_tmp | location | No | |
Timer5min | timer | No | |
Timer5minWindow | timerdialog | No | |
TimerHelping10min | timer | No | |
TimerRageBoss1 | timer | No | |
TimerRageBoss2 | timer | No | |
TimerRageBoss3 | timer | No | |
tips_ingame | string | Yes | |
Tips_OnOff | boolean | No | true |
TossCaster | unit | No | |
TossINT | integer | No | |
TossMovePos | location | No | |
TossREAL | real | No | |
TossTarget | unit | No | |
TossTargetedUnit | unit | No | |
TossTempPos | location | No | |
TossUnitGroup | group | No | |
TowersUnit | unit | Yes | |
TransportShip_Ship | unit | No | |
TransportShip_tmp | location | No | |
TransportShip_unit_tmp | location | No | |
TransportShip_UnitGroup | group | No | |
village_unit_attacked_move_pos | location | No | |
VillageMainBuilding_pos | location | No | |
villageUnitsTempPos | location | No | |
visibility_modf | fogmodifier | Yes | |
WavesChangeCounter1 | integer | No | |
WavesChangeRnd | integer | No | |
Win2Grunt_unit | unit | No |
// GUI-Friendly Damage Detection -- v1.2.1 -- by Weep
// http:// www.thehelper.net/forums/showthread.php?t=137957
//
// Requires: only this trigger and its variables.
//
// -- What? --
// This snippet provides a leak-free, GUI-friendly implementation of an "any unit takes
// damage" event. It requires no JASS knowledge to use.
//
// It uses the Game - Value Of Real Variable event as its method of activating other
// triggers, and passes the event responses through a few globals.
//
// -- Why? --
// The traditional GUI method of setting up a trigger than runs when any unit is damaged
// leaks trigger events. This snippet is easy to implement and removes the need to do
// you own GUI damage detection setup.
//
// -- How To Implement --
// 0. Before you copy triggers that use GDD into a new map, you need to copy over GDD
// with its GDD Variable Creator trigger, or there will be a problem: the variables
// won't be automatically created correctly.
//
// 1. Be sure "Automatically create unknown variables while pasting trigger data" is
// enabled in the World Editor general preferences.
// 2. Copy this trigger category ("GDD") and paste it into your map.
// (Alternately: create the variables listed in the globals block below, create a
// trigger named "GUI Friendly Damage Detection", and paste in this entire text.)
// 3. Create your damage triggers using Game - Value Of Real Variable as the event,
// select GDD_Event as the variable, and leave the rest of the settings to the default
// "becomes Equal to 0.00".
// The event responses are the following variables:
// GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
// GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
// Triggering Unit can still be used, if you need to use waits.
// Read the -- Notes -- section below for more info.
// GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.
//
// -- Notes --
// GDD's event response variables are not wait-safe; you can't use them after a wait in
// a trigger. If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can
// be used in place of GDD_DamageSource. There is no usable wait-safe equivalent to
// Event Damage or Damage Source; you'll need to save the values yourself.
//
// Don't write any values to the variables used as the event responses, or it will mess
// up any other triggers using this snippet for their triggering. Only use their values.
//
// This uses arrays, so can detect damage for a maximum of 8190 units at a time, and
// cleans up data at a rate of 33.33 per second, by default. This should be enough for
// most maps, but if you want to change the rate, change the value returned in the
// GDD_RecycleRate function at the top of the code, below.
//
// By default, GDD will not register units that have Locust at the moment of their
// entering the game, and will not recognize when they take damage (which can only
// happen if the Locust ability is later removed from the unit.) To allow a unit to have
// Locust yet still cause GDD damage events if Locust is removed, you can either design
// the unit to not have Locust by default and add it via triggers after creation, or
// edit the GDD_Filter function at the top of the code, below.
//
// -- Credits --
// Captain Griffin on wc3c.net for the research and concept of GroupRefresh.
//
// Credit in your map not needed, but please include this README.
//
// -- Version History --
// 1.2.1: Minor code cleaning. Added configuration functions. Updated documentation.
// 1.2.0: Made this snippet work properly with recursive damage.
// 1.1.1: Added a check in order to not index units with the Locust ability (dummy units).
// If you wish to check for damage taken by a unit that is unselectable, do not
// give the unit-type Locust in the object editor; instead, add the Locust ability
// 'Aloc' via a trigger after its creation, then remove it.
// 1.1.0: Added a check in case a unit gets moved out of the map and back.
// 1.0.0: First release.
//===================================================================
// Configurables.
function GDD_RecycleRate takes nothing returns real //The rate at which the system checks units to see if they've been removed from the game
return 0.03
endfunction
function GDD_Filter takes unit u returns boolean //The condition a unit has to pass to have it registered for damage detection
return GetUnitAbilityLevel(u, 'Aloc') == 0 //By default, the system ignores Locust units, because they normally can't take damage anyway
endfunction
//===================================================================
// This is just for reference.
// If you use JassHelper, you could uncomment this section instead of creating the variables in the trigger editor.
// globals
// real udg_GDD_Event = 0.
// real udg_GDD_Damage = 0.
// unit udg_GDD_DamagedUnit
// unit udg_GDD_DamageSource
// trigger array udg_GDD__TriggerArray
// integer array udg_GDD__Integers
// unit array udg_GDD__UnitArray
// group udg_GDD__LeftMapGroup = CreateGroup()
// endglobals
//===================================================================
// System code follows. Don't touch!
function GDD_Event takes nothing returns boolean
local unit damagedcache = udg_GDD_DamagedUnit
local unit damagingcache = udg_GDD_DamageSource
local real damagecache = udg_GDD_Damage
set udg_GDD_DamagedUnit = GetTriggerUnit()
set udg_GDD_DamageSource = GetEventDamageSource()
set udg_GDD_Damage = GetEventDamage()
set udg_GDD_Event = 1.
set udg_GDD_Event = 0.
set udg_GDD_DamagedUnit = damagedcache
set udg_GDD_DamageSource = damagingcache
set udg_GDD_Damage = damagecache
set damagedcache = null
set damagingcache = null
return false
endfunction
function GDD_AddDetection takes nothing returns boolean
// if(udg_GDD__Integers[0] > 8190) then
// call BJDebugMsg("GDD: Too many damage events! Decrease number of units present in the map or increase recycle rate.")
// ***Recycle rate is specified in the GDD_RecycleRate function at the top of the code. Smaller is faster.***
// return
// endif
if(IsUnitInGroup(GetFilterUnit(), udg_GDD__LeftMapGroup)) then
call GroupRemoveUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
elseif(GDD_Filter(GetFilterUnit())) then
set udg_GDD__Integers[0] = udg_GDD__Integers[0]+1
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = GetFilterUnit()
set udg_GDD__TriggerArray[udg_GDD__Integers[0]] = CreateTrigger()
call TriggerRegisterUnitEvent(udg_GDD__TriggerArray[udg_GDD__Integers[0]], udg_GDD__UnitArray[udg_GDD__Integers[0]], EVENT_UNIT_DAMAGED)
call TriggerAddCondition(udg_GDD__TriggerArray[udg_GDD__Integers[0]], Condition(function GDD_Event))
endif
return false
endfunction
function GDD_PreplacedDetection takes nothing returns nothing
local group g = CreateGroup()
local integer i = 0
loop
call GroupEnumUnitsOfPlayer(g, Player(i), Condition(function GDD_AddDetection))
set i = i+1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call DestroyGroup(g)
set g = null
endfunction
function GDD_GroupRefresh takes nothing returns nothing
// Based on GroupRefresh by Captain Griffen on wc3c.net
if (bj_slotControlUsed[5063] == true) then
call GroupClear(udg_GDD__LeftMapGroup)
set bj_slotControlUsed[5063] = false
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetEnumUnit())
endfunction
function GDD_Recycle takes nothing returns nothing
if(udg_GDD__Integers[0] <= 0) then
return
elseif(udg_GDD__Integers[1] <= 0) then
set udg_GDD__Integers[1] = udg_GDD__Integers[0]
endif
if(GetUnitTypeId(udg_GDD__UnitArray[udg_GDD__Integers[1]]) == 0) then
call DestroyTrigger(udg_GDD__TriggerArray[udg_GDD__Integers[1]])
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = null
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = udg_GDD__TriggerArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[1]] = udg_GDD__UnitArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = null
set udg_GDD__Integers[0] = udg_GDD__Integers[0]-1
endif
set udg_GDD__Integers[1] = udg_GDD__Integers[1]-1
endfunction
function GDD_LeaveMap takes nothing returns boolean
local boolean cached = bj_slotControlUsed[5063]
if(udg_GDD__Integers[2] < 64) then
set udg_GDD__Integers[2] = udg_GDD__Integers[2]+1
else
set bj_slotControlUsed[5063] = true
call ForGroup(udg_GDD__LeftMapGroup, function GDD_GroupRefresh)
set udg_GDD__Integers[2] = 0
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
set bj_slotControlUsed[5063] = cached
return false
endfunction
// ===========================================================================
function InitTrig_GUI_Friendly_Damage_Detection takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, GetWorldBounds())
call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function GDD_AddDetection))
call TriggerRegisterLeaveRegion(CreateTrigger(), r, Condition(function GDD_LeaveMap))
call GDD_PreplacedDetection()
call TimerStart(CreateTimer(), GDD_RecycleRate(), true, function GDD_Recycle)
set r = null
endfunction