- Joined
- Jul 22, 2015
- Messages
- 3,484
Uhh... why did you create another submission for this? There is an "Edit" button for a reason.
(Level of (Aura_AURAS[index]) for (Aura_TrigUnit)) Equal to 0
Set AAAM3_CycleArray[0] = your_unit
Trigger - Run AAAM3 Add Source <gen> (ignoring conditions)
AAAM3 Setup

Events


Time - Elapsed game time is 0.00 seconds

Conditions

Actions


-------- ----- --------


-------- SETTINGS START HERE --------


Set AAAM3_GROUPABIL = AAAM3GroupAbil


-------- Adding Events to periodic JASS triggers --------


-------- - --------


Trigger - Add to AAAM Periodic Instant <gen> the event (Time - Every 0.30 seconds of game time)


Trigger - Add to AAAM Periodic Intervals <gen> the event (Time - Every 0.03 seconds of game time)


-------- - --------


-------- Set this to the highest ability index --------


Set Aura_Number = 4


-------- - --------


-------- If you're only using 1 Periodic trigger, than delete this setting --------


Trigger - Turn off AAAM Periodic Intervals <gen>


-------- - --------


-------- If you are hitting the operation's limit, reduce this number --------


-------- - --------


Set AAAM3_CycleStep = 800


-------- - --------


-------- Adding units to Cycle array (add your conditions here) --------


For each (Integer A) from 1 to 16, do (Actions)



Loop - Actions




Unit Group - Pick every unit in (Units owned by (Player((Integer A)))) and do (Actions)





Loop - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








((Picked unit) is A structure) Equal to False







Then - Actions








Set Aura_CycleSize = (Aura_CycleSize + 1)








Set AAAM3_CycleArray[Aura_CycleSize] = (Picked unit)








Unit - Add AAAM3_GROUPABIL to (Picked unit)







Else - Actions






Set AAAM3_CycleArray[0] = (Picked unit)






Trigger - Run AAAM3 Add Source <gen> (ignoring conditions)


-------- - --------


-------- AURAS --------


Set Aura_AURAS[0] = ZZDamage Aura


Set Aura_BUFFS[0] = ZZDamage Aura


Set Aura_ABILITIES[0] = AAAM3|Buff_Damage


-------- - --------


Set Aura_AURAS[1] = ZZArmor Aura


Set Aura_BUFFS[1] = ZZArmor Aura


Set Aura_ABILITIES[1] = AAAM3|Buff_Armor


-------- - --------


Set Aura_AURAS[2] = ZZCritical Strike Aura


Set Aura_BUFFS[2] = ZZCritical Strike Aura


Set Aura_ABILITIES[2] = AAAM3|Spbk_Critical Strike


Player Group - Pick every player in (All players) and do (Actions)



Loop - Actions




Player - Disable Aura_ABILITIES[2] for (Picked player)


-------- - --------


Set Aura_AURAS[3] = ZZNegate Damage Aura


Set Aura_BUFFS[3] = ZZNegate Damage Aura


Set Aura_ABILITIES[3] = AAAM3|SpBk_Negate Damage


Player Group - Pick every player in (All players) and do (Actions)



Loop - Actions




Player - Disable Aura_ABILITIES[3] for (Picked player)


-------- - --------


Set Aura_AURAS[4] = ZZStats Aura


Set Aura_BUFFS[4] = ZZStats Aura


Set Aura_ABILITIES[4] = AAAM3|Buff_Stats


-------- - --------


-------- SETTINGS END HERE --------


-------- - --------


-------- Define Hashtable Values --------


Set AAAM3_CycleArray[Aura_CycleSize] = No unit


-------- Defining Cycle Interval --------


Set AAAM3_CycleMax = Aura_CycleSize


Set AAAM3_CycleMin = 1


Set AAAM3_newIndex = 1
AAAM3 Add Source

Events

Conditions

Actions


Custom script: local integer store_J = udg_AAAM3_J


For each (Integer AAAM3_J) from 0 to Aura_Number, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Level of Aura_AURAS[AAAM3_J] for AAAM3_CycleArray[0]) Not equal to 0






(AAAM3_CycleArray[0] is in Aura_SourceGroup[AAAM3_J]) Equal to False





Then - Actions






Set Aura_AuraCount[AAAM3_J] = (Aura_AuraCount[AAAM3_J] + 1)






Unit Group - Add AAAM3_CycleArray[0] to Aura_SourceGroup[AAAM3_J]





Else - Actions


Custom script: set udg_AAAM3_J = store_J
AAAM3 Clean SourceGroups

Events


Game - Aura_Event becomes Equal to 0.30

Conditions

Actions


Custom script: local unit udg_Aura_TrigUnit


Custom script: local group udg_temp_group


Custom script: local integer udg_AAAM3_i


Custom script: local integer udg_AAAM3_J


For each (Integer AAAM3_J) from 0 to Aura_Number, do (Actions)



Loop - Actions




Set Aura_AuraCount[((AAAM3_J + Aura_Number) + 1)] = 0




Custom script: set udg_temp_group = CreateGroup()




For each (Integer AAAM3_i) from 1 to Aura_AuraCount[AAAM3_J], do (Actions)





Loop - Actions






Custom script: set udg_Aura_TrigUnit = FirstOfGroup(udg_Aura_SourceGroup[udg_AAAM3_J])






Unit Group - Remove Aura_TrigUnit from Aura_SourceGroup[AAAM3_J]






Custom script: if not IsUnitType(udg_Aura_TrigUnit , UNIT_TYPE_DEAD) and GetUnitTypeId(udg_Aura_TrigUnit) != 0 and GetUnitAbilityLevel( udg_Aura_TrigUnit , udg_Aura_AURAS[udg_AAAM3_J]) != 0 then






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions







Then - Actions








Unit Group - Add Aura_TrigUnit to temp_group








Custom script: else








Custom script: endif







Else - Actions








Set Aura_AuraCount[((AAAM3_J + Aura_Number) + 1)] = (Aura_AuraCount[((AAAM3_J + Aura_Number) + 1)] + 1)




Custom script: call DestroyGroup(udg_Aura_SourceGroup[udg_AAAM3_J])




Set Aura_SourceGroup[AAAM3_J] = temp_group


Countdown Timer - Start AAAM3_Timer as a One-shot timer that will expire in 3.00 seconds


Custom script: set udg_temp_group = null


Custom script: set udg_Aura_TrigUnit = null


Trigger - Turn off (This trigger)
AAAM3 Clean Timer

Events


Time - AAAM3_Timer expires

Conditions

Actions


Custom script: local integer udg_AAAM3_J


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




Aura_AuraCount[(Aura_Number + (Aura_Number + 1))] Not equal to 1



Then - Actions




For each (Integer AAAM3_J) from 0 to Aura_Number, do (Actions)





Loop - Actions






Set Aura_AuraCount[AAAM3_J] = (Aura_AuraCount[AAAM3_J] - Aura_AuraCount[((AAAM3_J + Aura_Number) + 1)])






Countdown Timer - Start AAAM3_Timer as a One-shot timer that will expire in 7.00 seconds




Set Aura_AuraCount[(Aura_Number + (Aura_Number + 1))] = 1



Else - Actions




Trigger - Turn on AAAM3 Clean SourceGroups <gen>




Set Aura_AuraCount[(Aura_Number + (Aura_Number + 1))] = 0
AAAM3 Change Period Type

Events


Game - AAAM3_LimitChecker becomes Greater than 3000.00


Game - AAAM3_LimitChecker becomes Less than or equal to 3000.00

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




AAAM3_LimitChecker Greater than 3000.00



Then - Actions




Trigger - Turn off AAAM Periodic Instant <gen>




Trigger - Turn on AAAM Periodic Intervals <gen>



Else - Actions




Trigger - Turn off AAAM Periodic Intervals <gen>




Trigger - Turn on AAAM Periodic Instant <gen>
function AAAMPeriodicWE takes nothing returns boolean
local integer i = 0
local integer j = 0
local integer newIndex = udg_AAAM3_newIndex
local boolean leave = true
local integer store_i
local integer array validAuras
local integer max
loop
exitwhen i > udg_Aura_Number
if udg_Aura_AuraCount[i] > 0 then
//call BJDebugMsg(I2S(j))
set validAuras[j] = i
set j = j + 1
//call BJDebugMsg(I2S(i))
endif
set i = i + 1
endloop
set max = j - 1
set i = 0
set j = udg_AAAM3_CycleMin
//call BJDebugMsg(I2S(udg_AAAM3_CycleMin))
//call BJDebugMsg(I2S(udg_AAAM3_CycleMax))
if udg_AAAM3_CycleMin == 1 then
set udg_Aura_Event = 0.3 // Set Event for Starting a new cycle
endif
set udg_Aura_TrigUnit = udg_AAAM3_CycleArray[j]
set udg_Aura_Event = 0.1 //Set Event for Starting checks for 1 unit
loop
exitwhen j > udg_AAAM3_CycleMax
set udg_AAAM3_CycleArray[j] = null
loop
exitwhen i > max
set store_i = i
set i = validAuras[i]
if GetUnitAbilityLevel(udg_Aura_TrigUnit, udg_Aura_BUFFS[i]) > 0 then
if UnitAddAbility( udg_Aura_TrigUnit , udg_Aura_ABILITIES[i] ) then
set udg_Aura_Event = i // Set event for unit aquiring aura ability
endif
set leave = false
else
if UnitRemoveAbility( udg_Aura_TrigUnit , udg_Aura_ABILITIES[i] ) then
set udg_Aura_Event = 1 + udg_Aura_Number + i
endif
endif
set i = store_i + 1
endloop
if not leave then
set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit
set newIndex = newIndex + 1
else
if not IsUnitType(udg_Aura_TrigUnit , UNIT_TYPE_DEAD) then
if GetUnitTypeId(udg_Aura_TrigUnit) == 0 then
else
set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit
set newIndex = newIndex + 1
endif
else
call UnitRemoveAbility ( udg_Aura_TrigUnit , udg_AAAM3_GROUPABIL )
endif
set udg_Aura_Event = 0.5 //Set Event for unit being kicked out of the CycleAraay
endif
set udg_Aura_Event = 0.2 // Set Event for unit checks are finished
set j = j + 1
set udg_Aura_TrigUnit = udg_AAAM3_CycleArray[j]
set leave = true
set i = 0
set udg_Aura_Event = 0.1 //Set Event for unit checks begin for next unit
endloop
//call BJDebugMsg("Cycle Size: " + I2S(udg_Aura_CycleSize))
if udg_AAAM3_CycleMax + udg_AAAM3_CycleStep < udg_Aura_CycleSize then
set udg_AAAM3_CycleMin = udg_AAAM3_CycleMax+1
set udg_AAAM3_CycleMax = udg_AAAM3_CycleMax + udg_AAAM3_CycleStep
set udg_AAAM3_newIndex = newIndex
//call TriggerEvaluate(GetTriggeringTrigger())
else
if udg_AAAM3_CycleMax < udg_Aura_CycleSize then
set udg_AAAM3_CycleMin = udg_AAAM3_CycleMax+1
set udg_AAAM3_CycleMax = udg_Aura_CycleSize
set udg_AAAM3_newIndex = newIndex
//call TriggerEvaluate(GetTriggeringTrigger())
else
if udg_Aura_CycleSize < udg_AAAM3_CycleStep then
set udg_AAAM3_CycleMax = udg_Aura_CycleSize
else
set udg_AAAM3_CycleMax = udg_AAAM3_CycleStep
endif
set udg_AAAM3_CycleMin = 1
set udg_AAAM3_newIndex = 1
set udg_Aura_CycleSize = newIndex
set udg_Aura_Event = 0.4 //Set Event for Cycle is finished
endif
endif
return true
endfunction
//===========================================================================
function InitTrig_AAAM_Periodic_Intervals takes nothing returns nothing
set gg_trg_AAAM_Periodic_Intervals = CreateTrigger( )
//call TriggerRegisterTimerEvent( gg_trg_AAAM_Periodic_Intervals, 0.03, true )
call TriggerAddCondition( gg_trg_AAAM_Periodic_Intervals, Condition(function AAAMPeriodicWE) )
endfunction
function AAAMPeriodicWE2 takes nothing returns boolean
local integer i = 0
local integer j = 0
local integer newIndex = udg_AAAM3_newIndex
local boolean leave = true
local integer store_i
local integer array validAuras
local integer max
loop
exitwhen i > udg_Aura_Number
if udg_Aura_AuraCount[i] > 0 then
//call BJDebugMsg(I2S(j))
set validAuras[j] = i
set j = j + 1
endif
set i = i + 1
endloop
set max = j - 1
set i = 0
set j = udg_AAAM3_CycleMin
//call BJDebugMsg(I2S(udg_AAAM3_CycleMin))
//call BJDebugMsg(I2S(udg_AAAM3_CycleMax))
set udg_Aura_Event = 0.3 // Set Event for Starting a new cycle
set udg_Aura_TrigUnit = udg_AAAM3_CycleArray[j]
set udg_Aura_Event = 0.1 //Set Event for Starting checks for 1 unit
loop
exitwhen j > udg_AAAM3_CycleMax
set udg_AAAM3_CycleArray[j] = null
loop
exitwhen i > max
set store_i = i
set i = validAuras[i]
if GetUnitAbilityLevel(udg_Aura_TrigUnit, udg_Aura_BUFFS[i]) > 0 then
if UnitAddAbility( udg_Aura_TrigUnit , udg_Aura_ABILITIES[i] ) then
set udg_Aura_Event = i // Set event for unit aquiring aura ability
endif
set leave = false
else
if UnitRemoveAbility( udg_Aura_TrigUnit , udg_Aura_ABILITIES[i] ) then
set udg_Aura_Event = 1 + udg_Aura_Number + i
endif
endif
set i = store_i + 1
endloop
if not leave then
set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit
set newIndex = newIndex + 1
else
if not IsUnitType(udg_Aura_TrigUnit , UNIT_TYPE_DEAD) then
if GetUnitTypeId(udg_Aura_TrigUnit) == 0 then
else
set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit
set newIndex = newIndex + 1
endif
else
call UnitRemoveAbility ( udg_Aura_TrigUnit , udg_AAAM3_GROUPABIL )
endif
set udg_Aura_Event = 0.5 //Set Event for unit being kicked out of the CycleAraay
endif
set udg_Aura_Event = 0.2 // Set Event for unit checks are finished
set j = j + 1
set udg_Aura_TrigUnit = udg_AAAM3_CycleArray[j]
set leave = true
set i = 0
set udg_Aura_Event = 0.1 //Set Event for unit checks begin for next unit
endloop
//Set Event for Cycle is finished
//call BJDebugMsg("Cycle Size: " + I2S(udg_Aura_CycleSize))
if udg_AAAM3_CycleMax + udg_AAAM3_CycleStep < udg_Aura_CycleSize then
set udg_AAAM3_CycleMin = udg_AAAM3_CycleMax+1
set udg_AAAM3_CycleMax = udg_AAAM3_CycleMax + udg_AAAM3_CycleStep
set udg_AAAM3_newIndex = newIndex
call TriggerEvaluate(GetTriggeringTrigger())
else
if udg_AAAM3_CycleMax < udg_Aura_CycleSize then
set udg_AAAM3_CycleMin = udg_AAAM3_CycleMax+1
set udg_AAAM3_CycleMax = udg_Aura_CycleSize
set udg_AAAM3_newIndex = newIndex
call TriggerEvaluate(GetTriggeringTrigger())
else
if udg_Aura_CycleSize < udg_AAAM3_CycleStep then
set udg_AAAM3_CycleMax = udg_Aura_CycleSize
else
set udg_AAAM3_CycleMax = udg_AAAM3_CycleStep
endif
set udg_AAAM3_CycleMin = 1
set udg_AAAM3_newIndex = 1
set udg_Aura_CycleSize = newIndex
set udg_Aura_Event = 0.4
endif
endif
return true
endfunction
//===========================================================================
function InitTrig_AAAM_Periodic_Instant takes nothing returns nothing
set gg_trg_AAAM_Periodic_Instant = CreateTrigger( )
//call TriggerRegisterTimerEvent( gg_trg_AAAM_Periodic_Instant, 0.3, true )
call TriggerAddCondition( gg_trg_AAAM_Periodic_Instant, Condition(function AAAMPeriodicWE2) )
endfunction
AAAM Periodic GUI

Events


Time - Every 0.30 seconds of game time

Conditions

Actions


Custom script: local integer store_i


Custom script: local integer newIndex = 1


Custom script: local integer array validAuras


Set AAAM3_J = 0


For each (Integer AAAM3_i) from 0 to Aura_Number, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Aura_AuraCount[AAAM3_i] Greater than 0





Then - Actions






Custom script: set validAuras[udg_AAAM3_J] = udg_AAAM3_i






Set AAAM3_J = (AAAM3_J + 1)





Else - Actions


Set zzAura_GUI_Max = (AAAM3_J - 1)


Set Aura_Event = 0.30


For each (Integer AAAM3_J) from 1 to Aura_CycleSize, do (Actions)



Loop - Actions




Set zzAura_GUI_leave = True




Set Aura_TrigUnit = AAAM3_CycleArray[AAAM3_J]




Set Aura_Event = 0.10




Set AAAM3_CycleArray[AAAM3_J] = No unit




For each (Integer AAAM3_i) from 0 to zzAura_GUI_Max, do (Actions)





Loop - Actions






Custom script: set store_i = udg_AAAM3_i






Custom script: set udg_AAAM3_i = validAuras[store_i]






Custom script: if GetUnitAbilityLevel(udg_Aura_TrigUnit, udg_Aura_BUFFS[udg_AAAM3_i]) != 0 then






Set zzAura_GUI_leave = False






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Level of Aura_ABILITIES[AAAM3_i] for Aura_TrigUnit) Equal to 0







Then - Actions








Unit - Add Aura_ABILITIES[AAAM3_i] to Aura_TrigUnit








Set Aura_Event = (Real(AAAM3_i))







Else - Actions








Unit - Add Aura_ABILITIES[AAAM3_i] to Aura_TrigUnit






Custom script: else






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Level of Aura_ABILITIES[AAAM3_i] for Aura_TrigUnit) Not equal to 0







Then - Actions








Unit - Remove Aura_ABILITIES[AAAM3_i] from Aura_TrigUnit








Set Aura_Event = (((Real(AAAM3_i)) + (Real(Aura_Number))) + 1.00)







Else - Actions








Unit - Remove Aura_ABILITIES[AAAM3_i] from Aura_TrigUnit






Custom script: endif






Custom script: set udg_AAAM3_i = store_i




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






zzAura_GUI_leave Not equal to True





Then - Actions






Custom script: set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit






Custom script: set newIndex = newIndex + 1





Else - Actions






Set Aura_Event = 0.50






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Aura_TrigUnit is alive) Equal to True







Then - Actions








Custom script: set udg_AAAM3_CycleArray[newIndex] = udg_Aura_TrigUnit








Custom script: set newIndex = newIndex + 1







Else - Actions








Unit - Remove AAAM3_GROUPABIL from Aura_TrigUnit




Set Aura_Event = 0.20


Custom script: set udg_Aura_CycleSize = newIndex


Set Aura_Event = 0.40
function Nice takes nothing returns nothing
local integer totalProcessed = 0
local integer aId
local unit u
local integer i = 0
local group newGroup
loop
exitwhen aId > udg_GAAS_Number
exitwhen totalProcessed + udg_GAAS_GroupSize[aId]> 4000
set newGroup = CreateGroup()
loop
exitwhen i > udg_GAAS_GroupSize[aId]
set i = i + 1
set udg_GAAS_TrigUnit = FirstOfGroup(udg_GAAS_Groups[aId])
call GroupRemoveUnit(udg_GAAS_Groups[aId] , udg_GAAS_TrigUnit)
if GetUnitAbilityLevel(udg_GAAS_TrigUnit , udg_GAAS_BUFF[aId]) < 0 then
call UnitRemoveAbility(udg_GAAS_TrigUnit, udg_GAAS_ABIL[aId])
set udg_GAAS_RemoveEvent = aId
set udg_GAAS_GroupSize[aId] = udg_GAAS_GroupSize[aId] - 1
else
call GroupAddUnit(newGroup, udg_GAAS_TrigUnit)
endif
endloop
call DestroyGroup(udg_GAAS_Groups[aId])
set udg_GAAS_Groups[aId] = newGroup
set totalProcessed = totalProcessed + udg_GAAS_GroupSize[aId]
set aId = aId + 1
endloop
if aId > udg_GAAS_Number then
else
call ExecuteFunc("Nice")
endif
endfunction
function GAAS_TimerF takes nothing returns nothing
local integer runCount
local timer t = GetExpiredTimer()
local integer tHandle = GetHandleId(t)
local integer aId = LoadInteger(udg_GAAS_Hashtable, tHandle, 1)
local unit u = LoadUnitHandle(udg_GAAS_Hashtable, tHandle, 0)
if GetUnitAbilityLevel(u , udg_GAAS_BUFF[aId] ) > 0 then
call FlushChildHashtable(udg_GAAS_Hashtable, tHandle)
call RemoveSavedHandle(udg_GAAS_Hashtable, GetHandleId(u) , aId)
call PauseTimer(t)
call DestroyTimer(t)
else
set runCount = LoadInteger(udg_GAAS_Hashtable, tHandle, 2) + 1
call SaveInteger(udg_GAAS_Hashtable, tHandle, 2, runCount)
endif
set t = null
set u = null
endfunction
function GAAS_EnterRange takes nothing returns boolean
local unit source
local unit target = GetTriggerUnit()
local integer sourceHandle = GetHandleId(source)
local integer targetHandle = GetHandleId(target)
local integer aId = 0
local timer t
loop
exitwhen aId > udg_GAAS_Number
if LoadBoolean(udg_GAAS_Hashtable, aId, sourceHandle) and GetUnitAbilityLevel(target, udg_GAAS_AURA[aId]) > 0 then
set t = LoadTimerHandle(udg_GAAS_Hashtable, targetHandle, aId)
if t == null then
set t = CreateTimer()
call TimerStart(t, 0.1, true, function GAAS_TimerF)
call SaveTimerHandle(udg_GAAS_Hashtable, targetHandle, aId , t)
call SaveUnitHandle(udg_GAAS_Hashtable, GetHandleId(t), 0 , target)
call SaveInteger(udg_GAAS_Hashtable, GetHandleId(t), 1 , aId)
call SaveInteger(udg_GAAS_Hashtable, GetHandleId(t), 2 , 0)
else
call SaveInteger(udg_GAAS_Hashtable, GetHandleId(t), 2 , 0)
endif
endif
endloop
return false
endfunction
function GAAS_Source takes nothing returns nothing
local trigger trig
local boolean notSource =true
local integer aId = 0
local integer uHandle
//call FlushChild
loop
exitwhen aId > udg_GAAS_Number
if GetUnitAbilityLevel(udg_GAAS_TrigUnit, udg_GAAS_AURA[aId]) > 0 then
set notSource = false
if LoadBoolean(udg_GAAS_Hashtable, aId, uHandle) then
else
call SaveBoolean(udg_GAAS_Hashtable, aId, uHandle, true)
endif
else
if LoadBoolean(udg_GAAS_Hashtable, aId, uHandle) then
call RemoveSavedBoolean(udg_GAAS_Hashtable, aId, uHandle)
endif
endif
endloop
if notSource then
call DestroyTrigger(LoadTriggerHandle(udg_GAAS_Hashtable, uHandle , udg_GAAS_Number + 1))
call RemoveSavedHandle(udg_GAAS_Hashtable, uHandle , udg_GAAS_Number + 1)
else
if not HaveSavedHandle(udg_GAAS_Hashtable, uHandle , udg_GAAS_Number + 1) then
set trig = CreateTrigger()
call TriggerAddCondition(trig, Condition(function GAAS_EnterRange))
call SaveTriggerHandle(udg_GAAS_Hashtable, uHandle , udg_GAAS_Number + 1, trig)
endif
endif
endfunction
//===========================================================================
function InitTrig_AAAM4_Period takes nothing returns nothing
set gg_trg_AAAM4_Period = CreateTrigger( )
endfunction