Name | Type | is_array | initial_value |
AbsoluteCaster | unit | No | |
AbsolutePoint1 | location | No | |
AfterDestination | integer | Yes | |
AlreadyHit | group | Yes | |
Angle | real | Yes | |
Arthas | unit | No | |
AttackType | attacktype | Yes | |
Au | integervar | No | |
AuCaster | unit | Yes | |
AuDamageGroup | group | No | |
AuDamageHeal | real | Yes | |
AuExplosion | unit | No | |
AuFlyingHeight | real | Yes | |
AuHealGroup | group | No | |
AuIndex | integer | Yes | |
AuLights | unit | No | |
AuLightsAngle | real | No | |
AuLightsDistance | real | No | |
AuLightsPoint | location | No | |
AuOrb | unit | Yes | |
AuOrbGroup | group | Yes | |
AuOrbPoint | location | Yes | |
AuPlayer | player | Yes | |
AuTarget | unit | No | |
AuTargetPoint | location | No | |
BB | integervar | No | |
BB2 | integervar | No | |
BB_Angle | real | Yes | |
BB_Caster | unit | Yes | |
BB_CastNumber | integer | No | |
BB_Distance | real | Yes | |
BB_Height | real | Yes | |
BB_Missile | unit | Yes | |
BB_Off | boolean | Yes | |
BB_Point | location | Yes | |
BB_Speed | real | Yes | |
BB_Switch | integer | No | |
BB_Up | boolean | Yes | |
BL_Boolean | boolean | Yes | |
BL_Caster | unit | Yes | |
BL_Damage | real | Yes | |
BL_Dummy | unit | Yes | |
BL_Facing | real | Yes | |
BL_Group | group | Yes | |
BL_Height | real | Yes | |
BL_Index | integer | Yes | |
BL_Range | real | Yes | |
BL_SFX | effect | Yes | |
BL_SFXType | string | No | |
BL_Speed | real | Yes | |
BL_Targets | integer | Yes | |
BL_TempPoint | location | Yes | |
BL_Timer | real | Yes | |
Bounty | real | No | |
Bounty_Drop | texttag | No | |
BountyExpGroup | group | No | |
Bw_angle | real | No | |
bw_angle_array | real | Yes | |
Bw_caster | unit | No | |
Bw_check | boolean | No | |
bw_dummy_array | unit | Yes | |
bw_dummy_grp | group | No | |
bw_grp | group | No | |
bw_int | integer | No | |
bw_lightning | lightning | Yes | |
Bw_loc | location | No | |
Bw_offset | real | No | |
bw_timer | timer | No | |
bw_timer2 | timer | No | |
Caster | unit | No | |
Casters | group | No | |
CollisionRadius | real | Yes | |
Damage | real | Yes | |
DamageMethod | integer | Yes | |
DamageSource | unit | Yes | |
DamageSpecialEffect | string | Yes | |
DamageSpecialEffectLocation | string | Yes | |
DeathMissle | group | No | |
Deathpoint | location | Yes | |
Destributor | destructable | Yes | |
Destributor_Counts | integer | No | |
Distance | real | Yes | |
Drag | boolean | Yes | |
DummyUnit | unit | Yes | |
EC_AbilityLevel | integer | Yes | |
EC_CastingPlayer | player | Yes | |
EC_DummyAbility | abilcode | Yes | |
EC_DummyUnit | unitcode | Yes | |
EC_Duration | real | Yes | |
EC_Effect_Show | string | Yes | |
EC_Index | integer | Yes | |
EC_LightningDetectionAoE | real | Yes | |
EC_LightningTimer | real | Yes | |
EC_LightningTimerMax | real | Yes | |
EC_MaxLightningTargets | integer | Yes | |
EC_MaxLightningTargetsCounter | integer | Yes | |
EC_Off | boolean | Yes | |
EC_Point | location | No | |
EC_SEffect_Show | effect | Yes | |
EC_TargetUnit | unit | Yes | |
EC_TargetUnitEffect | string | Yes | |
EC_UnitGroup | group | No | |
Enemies | group | No | |
ExpGain | real | No | |
ExpGainINT1 | integer | No | |
ExpGainINT2 | integer | No | |
ExplodeRadius | real | Yes | |
ExpPoint | integer | No | |
ExpPointR | real | No | |
FM_Caster | unit | No | |
FM_Group | group | No | |
FM_Integer | integervar | No | |
FM_Level | integer | No | |
FM_Position | location | No | |
FM_Target | unit | No | |
FM_TargetOffset | location | No | |
FM_TargetPos | location | No | |
FW_Cast_Duration | integer | Yes | |
FW_Cast_Id | integer | No | |
FW_Cast_Level | integer | Yes | |
FW_Loop | integervar | No | |
FW_Loop_Number | integer | No | |
FW_Point | location | No | |
FW_Target_Location | location | Yes | |
FW_Ward_Group | group | Yes | |
GameValue | integer | 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 | |
GroupVar11 | group | No | |
GroupVar4 | group | No | |
GroupVarDeath | group | No | |
hash1 | hashtable | No | |
Hashtable | hashtable | No | |
HorizontalArc | real | Yes | |
HP_Active | boolean | Yes | |
HP_Caster | unit | Yes | |
HP_Corner_Points | location | Yes | |
HP_Demon_Time_Amount | real | Yes | |
HP_Demon_Timer | real | Yes | |
HP_Demon_Unit | unit | Yes | |
HP_DisplayDummy | unit | Yes | |
HP_DisplayGroup | group | No | |
HP_DisplayHash | hashtable | No | |
HP_DisplayImpulseOut | boolean | No | |
HP_DisplayPoint | location | Yes | |
HP_DisplayReal | real | Yes | |
HP_DisplayTempInteger | integervar | Yes | |
HP_DPS_Amount | real | Yes | |
HP_DPS_Timer | real | Yes | |
HP_Dummy_Angle | real | No | |
HP_Dummy_Height_Point | location | Yes | |
HP_Dummy_Number_1 | integervar | No | |
HP_Dummy_Number_2 | integer | No | |
HP_Dummy_Point | location | Yes | |
HP_Height | real | Yes | |
HP_Height_Point | location | Yes | |
HP_Height_Unit | unit | Yes | |
HP_MUI | integer | No | |
HP_MUI_Current | integervar | No | |
HP_MUI_Total | integer | No | |
HP_Portal | unit | Yes | |
HP_Portal_AoE | real | Yes | |
HP_Portal_Dummy_Angle | real | No | |
HP_Portal_Offset_Dist | real | No | |
HP_Portal_Point | location | Yes | |
HP_Portal_Timer | real | Yes | |
HP_SFX_Lightning_Ring | lightning | Yes | |
HP_SFX_Lightning_Ring1 | lightning | Yes | |
HP_SFX_Lightning_Star | lightning | Yes | |
HP_SFX_Lightning_Star1 | lightning | Yes | |
HP_SFX_Lightning_Star2 | lightning | Yes | |
HP_SFX_Portal | effect | Yes | |
HP_SFX_Summon_Demon_Ring | effect | Yes | |
HP_Target_Group | group | Yes | |
HP_Time_Amount | real | Yes | |
I | integervar | No | |
I_Angle | real | Yes | |
I_Arc | real | Yes | |
I_Caster | unit | Yes | |
I_CastNumber | integer | No | |
I_ConstDistance | real | Yes | |
I_Damage | real | Yes | |
I_Distance | real | Yes | |
I_Dummie | unit | Yes | |
I_Group | group | No | |
I_Missile1 | unit | Yes | |
I_Missile2 | unit | Yes | |
I_Off | boolean | Yes | |
I_Offset | real | Yes | |
I_Point | location | Yes | |
I_point | location | Yes | |
I_Speed | real | Yes | |
I_Switch | integer | No | |
IAAngle | real | Yes | |
IAArrow | unit | Yes | |
IACaster | unit | Yes | |
IACasterPoint | location | Yes | |
IACount | integer | No | |
IADamage | real | Yes | |
IADistance | real | Yes | |
IADMGGroup | group | Yes | |
IAHas | boolean | Yes | |
IAIndex | integer | No | |
IAInteger | integervar | No | |
IALastRecycled | integer | No | |
IAMax | integer | No | |
IAMaxDistance | real | Yes | |
IARecycledList | integer | Yes | |
IATargetPoint | location | Yes | |
Index | integer | No | |
IndexReseter | integer | No | |
Integer | integer | No | |
IntegerC | integervar | Yes | |
IP_integer | integervar | No | |
Jump | boolean | Yes | |
kb_angle | real | Yes | |
KB_Angle | real | Yes | |
kb_bolean | boolean | Yes | |
kb_caster | unit | Yes | |
KB_Casters | unit | Yes | |
KB_CountBuffs | integer | No | |
KB_DestroyTrees | boolean | Yes | |
kb_distance | real | Yes | |
KB_Effects_1 | string | Yes | |
KB_Effects_2 | string | Yes | |
KB_GeneralIntegers | integervar | Yes | |
KB_KnockbackedUnits | group | No | |
KB_Levels | integer | Yes | |
kb_lighting | lightning | Yes | |
KB_MaxDistance | real | Yes | |
KB_ReachedDistance | real | Yes | |
KB_ReducedReal | real | No | |
KB_ReduceSpeedReal | real | Yes | |
KB_SpecificSpeed | real | Yes | |
KB_StartPositions | location | Yes | |
KB_TempPoint | location | Yes | |
KB_TempReal | real | No | |
KB_TotalKnockUnits | integer | No | |
KB_Units | unit | Yes | |
KBA_Caster | unit | No | |
KBA_DestroyTrees | boolean | No | |
KBA_DistancePerLevel | real | No | |
KBA_Level | integer | No | |
KBA_SpecialEffects | string | Yes | |
KBA_Speed | real | No | |
KBA_StartingPosition | location | No | |
KBA_TargetUnit | unit | No | |
LG_angle | real | Yes | |
LG_angleSet | boolean | Yes | |
LG_caster | unit | Yes | |
LG_casterPoint | location | No | |
LG_castingGroup | group | No | |
LG_damagedGroup | group | Yes | |
LG_dummy | unit | Yes | |
LG_dummyEffect | string | No | |
LG_dummyReached | boolean | Yes | |
LG_effectDelay | real | No | |
LG_effectDelayCount | real | Yes | |
LG_index1 | integer | Yes | |
LG_index2 | integer | No | |
LG_index3 | integervar | No | |
LG_indexMax | integer | No | |
LG_indexSize | integer | No | |
LG_isStillMoving | boolean | Yes | |
LG_landingDamage | real | Yes | |
LG_landingDamageAoE | real | No | |
LG_landingEffect | string | No | |
LG_lightning | lightning | Yes | |
LG_lightningHeight | real | No | |
LG_lineDamage | real | Yes | |
LG_lineDamageAoE | real | No | |
LG_moveSpeed | real | No | |
LG_pullAcceleration | real | No | |
LG_pullDelay | real | Yes | |
LG_pulledEffect | string | No | |
LG_pulledEnemies | integer | Yes | |
LG_pulledEnemiesAlong | boolean | No | |
LG_pulledGroup | group | Yes | |
LG_pullSpeed | real | Yes | |
LG_shockedEffect | string | No | |
LG_spell | abilcode | No | |
LG_spellEnd | boolean | Yes | |
LG_targetRect | rect | Yes | |
LifeSteal | real | No | |
LoopIndex | integervar | No | |
LS_Dummy | unit | No | |
LS_GeneralInteger | integervar | No | |
LS_Groups | group | Yes | |
LS_TempPoint | location | Yes | |
LW_Angle1 | real | Yes | |
LW_Angle2Saved | real | No | |
LW_AoE1 | real | Yes | |
LW_AoE2 | real | No | |
LW_AoE3 | real | No | |
LW_Caster | unit | Yes | |
LW_Check | boolean | Yes | |
LW_Count | integer | No | |
LW_CurrentDistance | real | Yes | |
LW_Damage1 | real | Yes | |
LW_Damage2 | real | Yes | |
LW_Distance | real | Yes | |
LW_Dummy | unit | No | |
LW_Effect1 | string | No | |
LW_Effect2 | string | No | |
LW_Index1 | integer | No | |
LW_Index2 | integer | No | |
LW_Index3 | integervar | No | |
LW_Integer | integervar | Yes | |
LW_Lightning | lightning | Yes | |
LW_Multiplier | real | No | |
LW_Point1 | location | Yes | |
LW_Point2 | location | No | |
LW_Point3 | location | No | |
LW_Point4 | location | No | |
LW_Real1 | real | Yes | |
LW_Real2 | real | No | |
LW_Speed | real | No | |
LW_Speed2 | real | No | |
LW_XY | location | No | |
LW_Z1 | real | No | |
MB_Angle | real | Yes | |
MB_Booleen | boolean | Yes | |
MB_Caster | unit | Yes | |
MB_CasterLocation | location | Yes | |
MB_Center | location | Yes | |
MB_Counter | integer | No | |
MB_Coutbuff | integer | Yes | |
MB_Damage | real | Yes | |
MB_DamageGroup | group | Yes | |
MB_Distance | real | Yes | |
MB_DummyGroup | group | Yes | |
MB_DummyLocation | location | Yes | |
MB_Effect1 | string | Yes | |
MB_Effect2 | string | Yes | |
MB_Eyecandy1 | real | Yes | |
MB_Finish | boolean | Yes | |
MB_Formula | real | Yes | |
MB_Group | group | Yes | |
MB_HOW | integer | Yes | |
MB_Index | integer | No | |
MB_Integer | integer | No | |
MB_KnockPerMissile | real | Yes | |
MB_Level | integer | Yes | |
MB_Loop | integervar | No | |
MB_MaxDistance | real | Yes | |
MB_MissileAoE | real | Yes | |
MB_MissileNumber | integer | Yes | |
MB_MoveLocation | location | Yes | |
MB_Player | player | Yes | |
MB_Point | location | Yes | |
MB_Speed | real | Yes | |
MB_Switch | integer | Yes | |
MB_Target | unit | Yes | |
MB_TargetLocation | location | Yes | |
MBLevel | integer | Yes | |
Missile | unit | Yes | |
MissileEffect | effect | Yes | |
MissileEffectString | string | Yes | |
MissileSize | real | Yes | |
OnorOff | group | No | |
PickedPlayers | player | No | |
PlayerColors | string | Yes | |
Points | location | Yes | |
PR | integervar | No | |
PR_CenterPoint | location | Yes | |
PR_Chance | integer | No | |
PR_Damage | real | Yes | |
PR_DebugGroup | group | Yes | |
PR_Effects | integer | No | |
PR_Group | group | No | |
PR_Hero | unit | Yes | |
PR_Interval | real | Yes | |
PR_IntervalSkip | real | Yes | |
PR_MaxRadius | real | Yes | |
PR_On | boolean | Yes | |
PR_Perimeter | real | Yes | |
PR_Point | location | Yes | |
PR_Radius | real | Yes | |
PR_RingWide | real | Yes | |
PR_Skip | integer | No | |
PR_Times | integer | No | |
PR_Waves | integer | Yes | |
PRE | integervar | No | |
questMain | quest | No | |
questMainReq | questitem | No | |
questOptiona | quest | No | |
questOptionalReq | questitem | No | |
Real | real | Yes | |
Revive_TIME | timer | No | |
Revive_Timer | timerdialog | No | |
SD_Caster | unit | No | |
SD_Effect | string | No | |
SD_Integer | integervar | No | |
SD_Offset | location | No | |
SD_Point | location | No | |
SD_Real | real | No | |
SoulDrainer | unit | No | |
SpecialEffect | effect | Yes | |
SpecialEffectTest | effect | Yes | |
SpecialEffectTest2 | effect | Yes | |
Speed | real | Yes | |
StartPoint | location | Yes | |
TargetsAllies | boolean | Yes | |
TempGroup | group | No | |
tempGroup | group | No | |
TempGroup2 | group | No | |
TempInt | integer | No | |
tempInteger | integer | No | |
TempLoc | location | No | |
TempLoc10 | location | No | |
TempLoc2 | location | No | |
TempLoc3 | location | No | |
TempLoc46 | location | No | |
TempLoc5 | location | No | |
TempLoc51 | location | No | |
TempLoc52 | location | No | |
TempLoc53 | location | No | |
TempLoc54 | location | No | |
TempLoc555 | location | No | |
TempLoc556 | location | No | |
TempLoc6 | location | No | |
TempLoc9 | location | No | |
TempLocDeath | location | No | |
tempPlayerGroup | force | No | |
TempPoint | location | Yes | |
tempPoint | location | No | |
TempPoint2 | location | No | |
tempPoint2 | location | No | |
TempPoint3 | location | No | |
tempPoint3 | location | No | |
tempReal | real | No | |
TempReal | real | No | |
TempUnit | unit | No | |
tempUnit | unit | No | |
TempValue | integer | No | |
TerrainandBoundaryReaction | integer | Yes | |
Text_Duration | real | No | |
TextSize_dmg | real | No | |
TextSize_spells | real | No | |
Timer | timer | No | |
Timer_1 | timer | No | |
Timer_Window | timerdialog | No | |
Times2 | integer | No | |
UnitVarLastUnit | unit | Yes | |
UnitVarPicked2 | unit | No | |
VerticalArc | real | Yes | |
Window_Timer | timerdialog | 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