Name | Type | is_array | initial_value |
GCOS_Angle | real | No | |
GCOS_CenterX | real | No | |
GCOS_CenterY | real | No | |
GCOS_Hashtable | hashtable | No | |
GCOS_Instance | integer | No | |
GCOS_InstanceArray | integer | Yes | |
GCOS_NumPoints | integer | No | 20 |
GCOS_RadiusX | real | No | |
GCOS_RadiusY | real | No | |
GCOS_Rotate | real | No | |
GCOS_SpinUnits | boolean | No | |
GCOS_Tilt | real | No | |
Test_Circle | integer | No | |
TestPaladin | unit | No | UnitNull |
TestPoint | location | No | |
TestTable | hashtable | No | |
TestUnit | unit | Yes | |
WB_MaxX | real | No | |
WB_MaxY | real | No | |
WB_MinX | real | No | |
WB_MinY | real | No | |
WB_World | rect | No |
////////////////////////////////////////////////////////
//Guhun's Circle Object System version 1.3.0
////////////////////////////////////////////////////////
//a = radius x, b = radius y, h = center x, k = center y, R = rotation(tilt)
//x = h + acos(2pi*t)cos(R) - bsin(2pi*t)sin(R)
//y = k + acos(2pi*t)sin(R) + bsin(2pi*t)cos(R)
//https://math.stackexchange.com/questions/941490/whats-the-parametric-equation-for-the-general-form-of-an-ellipse-rotated-by-any
////////////////////////////////////////////////////////
//This function updates the coordinates of a circle, also spinning it by its specified spin
//You need to call this function after directly changing values in the Hashtable or with the Set functions
function UpdateGCOS takes integer instance returns nothing
local real centerX = LoadReal(udg_GCOS_Hashtable, instance, 1)
local real centerY = LoadReal(udg_GCOS_Hashtable, instance, 2)
local real radiusX = LoadReal(udg_GCOS_Hashtable, instance, 3)
local real radiusY = LoadReal(udg_GCOS_Hashtable, instance, 4)
local integer numPoints = LoadInteger(udg_GCOS_Hashtable, instance, 5)
local real tilt = LoadReal(udg_GCOS_Hashtable,instance,6)
local real angle = LoadReal(udg_GCOS_Hashtable, -instance, 0)
local real step = 2*bj_PI/I2R(numPoints)
local real posX
local real posY
local boolean isElipse = radiusX != radiusY
local integer count = 1
set angle = angle + LoadReal(udg_GCOS_Hashtable,instance,7) //The real being added is the rotation/spin step
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
loop
exitwhen count > numPoints
set angle = angle + step
if isElipse then
set posX = centerX + radiusX*Cos(angle)*Cos(tilt) - radiusY*Sin(angle)*Sin(tilt)
set posY = centerY + radiusX*Cos(angle)*Sin(tilt) + radiusY*Sin(angle)*Cos(tilt)
else
set posX = centerX + radiusX*Cos(angle)
set posY = centerY + radiusX*Sin(angle)
endif
if posX < udg_WB_MaxX and posX > udg_WB_MinX then
call SaveReal(udg_GCOS_Hashtable, -instance, count, posX)
call SetUnitX(LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + count ), posX)
endif
if posY < udg_WB_MaxY and posY > udg_WB_MinY then
call SaveReal(udg_GCOS_Hashtable, -instance, -count, posY)
call SetUnitY(LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + count ), posY)
endif
set count = count + 1
endloop
endfunction
//Creates a GCOS and automatically updates its position using the UpdateGCOS fucntion
function CreateGCOS takes real angle, real centerX, real centerY, real radiusX, real radiusY, integer numPoints, real tilt, real spin returns integer
local integer instance
local integer count = 1
local real step = 2*bj_PI/I2R(numPoints)
//This code generates an instance number for the circle object
set instance = udg_GCOS_InstanceArray[0]
if udg_GCOS_InstanceArray[udg_GCOS_InstanceArray[0]] == 0 then
set udg_GCOS_InstanceArray[0] = udg_GCOS_InstanceArray[0] + 1
else
set udg_GCOS_InstanceArray[0] = udg_GCOS_InstanceArray[udg_GCOS_InstanceArray[0]]
set udg_GCOS_InstanceArray[instance] = 0
endif
//End of instance number generation
call SaveReal(udg_GCOS_Hashtable, instance, 0, angle)
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
call SaveReal(udg_GCOS_Hashtable, instance, 1, centerX)
call SaveReal(udg_GCOS_Hashtable, instance, 2, centerY)
call SaveReal(udg_GCOS_Hashtable, instance, 3, radiusX)
call SaveReal(udg_GCOS_Hashtable, instance, 4, radiusY)
call SaveInteger(udg_GCOS_Hashtable, instance, 5, numPoints)
call SaveReal(udg_GCOS_Hashtable, instance, 6, tilt)
call SaveReal(udg_GCOS_Hashtable, instance, 7, 0)
set udg_GCOS_Instance = instance
call UpdateGCOS(instance)
call SaveReal(udg_GCOS_Hashtable, instance, 7, spin)
return instance
endfunction
function DestroyGCOS takes integer instance returns nothing
call FlushChildHashtable(udg_GCOS_Hashtable, instance)
call FlushChildHashtable(udg_GCOS_Hashtable, -instance)
set udg_GCOS_InstanceArray[instance] = udg_GCOS_InstanceArray[0]
set udg_GCOS_InstanceArray[0] = instance
endfunction
//=================
//Set/Get functions that are hopefully inlined
//=================
function GetGCOSDefAngle takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 0)
endfunction
function GetGCOSCurAngle takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, -instance, 0)
endfunction
function GetGCOSCenterX takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 1)
endfunction
function GetGCOSCenterY takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 2)
endfunction
function GetGCOSRadiusX takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 3)
endfunction
function GetGCOSRadiusY takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 4)
endfunction
function GetGCOSNoPoints takes integer instance returns integer
return LoadInteger(udg_GCOS_Hashtable, instance, 5)
endfunction
function GetGCOSTilt takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 6)
endfunction
function GetGCOSSpin takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 7)
endfunction
function SetGCOSDefAngle takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 0, angle)
endfunction
function SetGCOSCurAngle takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
endfunction
function SetGCOSCenterX takes integer instance, real X returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 1, X)
endfunction
function SetGCOSCenterY takes integer instance, real Y returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 2, Y)
endfunction
function SetGCOSRadiusX takes integer instance, real X returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 3, X)
endfunction
function SetGCOSRadiusY takes integer instance, real Y returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 4, Y)
endfunction
function SetGCOSNoPoints takes integer instance, integer number returns nothing
call SaveInteger(udg_GCOS_Hashtable, instance, 5, number)
endfunction
function SetGCOSTilt takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 6, angle)
endfunction
function SetGCOSSpin takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 7, angle)
endfunction
function GetGCOSPointX takes integer instance, integer pointNumber returns real
return LoadReal(udg_GCOS_Hashtable, -instance, pointNumber )
endfunction
function GetGCOSPointY takes integer instance, integer pointNumber returns real
return LoadReal(udg_GCOS_Hashtable, -instance, -pointNumber )
endfunction
function SetGCOSUnit takes integer instance, integer pointNumber, unit u returns nothing
call SaveUnitHandle(udg_GCOS_Hashtable, instance, 100 + pointNumber, u )
endfunction
function GetGCOSUnit takes integer instance, integer pointNumber returns unit
return LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + pointNumber )
endfunction
////////////////////////////////////////////////////////
//End of Circle Object System
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//Guhun's Circle Object System version 2.0.0
////////////////////////////////////////////////////////////////////////////////////////////////////
//a = radius x, b = radius y, h = center x, k = center y, R = rotation(tilt)
//x = h + acos(2pi*t)cos(R) - bsin(2pi*t)sin(R)
//y = k + acos(2pi*t)sin(R) + bsin(2pi*t)cos(R)
//https://math.stackexchange.com/questions/941490/whats-the-parametric-equation-for-the-general-form-of-an-ellipse-rotated-by-any
////////////////////////////////////////////////////////////////////////////////////////////////////
// API Documentation
////////////////////////////////////////////////////////
// Circle Creation/Destruction
////////////////////////////////////////////////////////
//function CreateGCOS takes real angle, real centerX, real centerY, real radiusX, real radiusY, integer numPoints, real tilt, real spin returns integer
//function DestroyGCOS takes integer instance returns nothing
////////////////////////////////////////////////////////
// This function updates a Circle Object, moving all units to their respective points and spinning the circle
//////////////////////////////////////////////////////
//function UpdateGCOS takes integer instance returns nothing
////////////////////////////////////////////////////////
// Returns/sets the default/initial angle of the Circle Object
////////////////////////////////////////////////////////
//function GetGCOSDefAngle takes integer instance returns real
//function SetGCOSDefAngle takes integer instance, real angle returns nothing
////////////////////////////////////////////////////////
// Returns/sets the current angle of the Circle Object
////////////////////////////////////////////////////////
//function GetGCOSCurAngle takes integer instance returns real
//function SetGCOSCurAngle takes integer instance, real angle returns nothing
////////////////////////////////////////////////////////
// Return/set the central coordinates of a Circle Object
////////////////////////////////////////////////////////
//function GetGCOSCenterX takes integer instance returns real
//function GetGCOSCenterY takes integer instance returns real
//function SetGCOSCenterX takes integer instance, real X returns nothing
//function SetGCOSCenterY takes integer instance, real Y returns nothing
////////////////////////////////////////////////////////
// Return/set the radius values of the Circle Object
////////////////////////////////////////////////////////
//function GetGCOSRadiusX takes integer instance returns real
//function GetGCOSRadiusY takes integer instance returns real
//function SetGCOSRadiusX takes integer instance, real X returns nothing
//function SetGCOSRadiusY takes integer instance, real Y returns nothing
////////////////////////////////////////////////////////
// Returns/sets the number of points in a Circle Object
////////////////////////////////////////////////////////
//function GetGCOSNoPoints takes integer instance returns integer
//function SetGCOSNoPoints takes integer instance, integer number returns nothing
////////////////////////////////////////////////////////
// Returns/sets the Tilt of a Circle Object (for elipsi)
////////////////////////////////////////////////////////
//function GetGCOSTilt takes integer instance returns real
//function SetGCOSTilt takes integer instance, real angle returns nothing
////////////////////////////////////////////////////////
// Returns/sets the spinning speed of the Circle Object, in radians
////////////////////////////////////////////////////////
//function GetGCOSSpin takes integer instance returns real
//function SetGCOSSpin takes integer instance, real angle returns nothing
////////////////////////////////////////////////////////
// Returns the coordinates of a point in the Circle Object
////////////////////////////////////////////////////////
//function GetGCOSPointX takes integer instance, integer pointNumber returns real
//function GetGCOSPointY takes integer instance, integer pointNumber returns real
////////////////////////////////////////////////////////
// Returns/sets a unit attached to a certain point of the Circle Object
////////////////////////////////////////////////////////
//function SetGCOSUnit takes integer instance, integer pointNumber, unit u returns nothing
//function GetGCOSUnit takes integer instance, integer pointNumber returns unit
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// Source Code (DO NOT CHANGE ANYTHING BELOW THIS POINT)
////////////////////////////////////////////////////////
//This function updates the coordinates of a circle, also spinning it by its specified spin
//You need to call this function after directly changing values in the Hashtable or with the Set functions
function UpdateGCOS takes integer instance returns nothing
local real centerX = LoadReal(udg_GCOS_Hashtable, instance, 1)
local real centerY = LoadReal(udg_GCOS_Hashtable, instance, 2)
local real radiusX = LoadReal(udg_GCOS_Hashtable, instance, 3)
local real radiusY = LoadReal(udg_GCOS_Hashtable, instance, 4)
local integer numPoints = LoadInteger(udg_GCOS_Hashtable, instance, 5)
local real tilt = LoadReal(udg_GCOS_Hashtable,instance,6)
local real angle = LoadReal(udg_GCOS_Hashtable, -instance, 0)
local real step = 2*bj_PI/I2R(numPoints)
local real posX
local real posY
local boolean isElipse = radiusX != radiusY
local integer count = 1
set angle = ModuloReal(angle + LoadReal(udg_GCOS_Hashtable,instance,7),2*bj_PI) //The real being added is the rotation/spin step
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
loop
exitwhen count > numPoints
set angle = angle + step
if isElipse then
set posX = centerX + radiusX*Cos(angle)*Cos(tilt) - radiusY*Sin(angle)*Sin(tilt)
set posY = centerY + radiusX*Cos(angle)*Sin(tilt) + radiusY*Sin(angle)*Cos(tilt)
else
set posX = centerX + radiusX*Cos(angle)
set posY = centerY + radiusX*Sin(angle)
endif
if posX < udg_WB_MaxX and posX > udg_WB_MinX then
call SaveReal(udg_GCOS_Hashtable, -instance, count, posX)
call SetUnitX(LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + count ), posX)
endif
if posY < udg_WB_MaxY and posY > udg_WB_MinY then
call SaveReal(udg_GCOS_Hashtable, -instance, -count, posY)
call SetUnitY(LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + count ), posY)
endif
set count = count + 1
endloop
endfunction
//Creates a GCOS and automatically updates its position using the UpdateGCOS fucntion
function CreateGCOS takes real angle, real centerX, real centerY, real radiusX, real radiusY, integer numPoints, real tilt, real spin returns integer
local integer instance
local integer count = 1
local real step = 2*bj_PI/I2R(numPoints)
//This code generates an instance number for the circle object
set instance = udg_GCOS_InstanceArray[0]
if udg_GCOS_InstanceArray[udg_GCOS_InstanceArray[0]] == 0 then
set udg_GCOS_InstanceArray[0] = udg_GCOS_InstanceArray[0] + 1
else
set udg_GCOS_InstanceArray[0] = udg_GCOS_InstanceArray[udg_GCOS_InstanceArray[0]]
set udg_GCOS_InstanceArray[instance] = 0
endif
//End of instance number generation
call SaveReal(udg_GCOS_Hashtable, instance, 0, angle)
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
call SaveReal(udg_GCOS_Hashtable, instance, 1, centerX)
call SaveReal(udg_GCOS_Hashtable, instance, 2, centerY)
call SaveReal(udg_GCOS_Hashtable, instance, 3, radiusX)
call SaveReal(udg_GCOS_Hashtable, instance, 4, radiusY)
call SaveInteger(udg_GCOS_Hashtable, instance, 5, numPoints)
call SaveReal(udg_GCOS_Hashtable, instance, 6, tilt)
call SaveReal(udg_GCOS_Hashtable, instance, 7, 0)
set udg_GCOS_Instance = instance
call UpdateGCOS(instance)
call SaveReal(udg_GCOS_Hashtable, instance, 7, spin)
return instance
endfunction
function DestroyGCOS takes integer instance returns nothing
call FlushChildHashtable(udg_GCOS_Hashtable, instance)
call FlushChildHashtable(udg_GCOS_Hashtable, -instance)
set udg_GCOS_InstanceArray[instance] = udg_GCOS_InstanceArray[0]
set udg_GCOS_InstanceArray[0] = instance
endfunction
//=================
//Set/Get functions that are hopefully inlined
//=================
function GetGCOSDefAngle takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 0)
endfunction
function GetGCOSCurAngle takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, -instance, 0)
endfunction
function GetGCOSCenterX takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 1)
endfunction
function GetGCOSCenterY takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 2)
endfunction
function GetGCOSRadiusX takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 3)
endfunction
function GetGCOSRadiusY takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 4)
endfunction
function GetGCOSNoPoints takes integer instance returns integer
return LoadInteger(udg_GCOS_Hashtable, instance, 5)
endfunction
function GetGCOSTilt takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 6)
endfunction
function GetGCOSSpin takes integer instance returns real
return LoadReal(udg_GCOS_Hashtable, instance, 7)
endfunction
function SetGCOSDefAngle takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 0, angle)
endfunction
function SetGCOSCurAngle takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, -instance, 0, angle)
endfunction
function SetGCOSCenterX takes integer instance, real X returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 1, X)
endfunction
function SetGCOSCenterY takes integer instance, real Y returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 2, Y)
endfunction
function SetGCOSRadiusX takes integer instance, real X returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 3, X)
endfunction
function SetGCOSRadiusY takes integer instance, real Y returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 4, Y)
endfunction
function SetGCOSNoPoints takes integer instance, integer number returns nothing
call SaveInteger(udg_GCOS_Hashtable, instance, 5, number)
endfunction
function SetGCOSTilt takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 6, angle)
endfunction
function SetGCOSSpin takes integer instance, real angle returns nothing
call SaveReal(udg_GCOS_Hashtable, instance, 7, angle)
endfunction
function GetGCOSPointX takes integer instance, integer pointNumber returns real
return LoadReal(udg_GCOS_Hashtable, -instance, pointNumber )
endfunction
function GetGCOSPointY takes integer instance, integer pointNumber returns real
return LoadReal(udg_GCOS_Hashtable, -instance, -pointNumber )
endfunction
function SetGCOSUnit takes integer instance, integer pointNumber, unit u returns nothing
call SaveUnitHandle(udg_GCOS_Hashtable, instance, 100 + pointNumber, u )
endfunction
function GetGCOSUnit takes integer instance, integer pointNumber returns unit
return LoadUnitHandle(udg_GCOS_Hashtable, instance, 100 + pointNumber )
endfunction
////////////////////////////////////////////////////////
//End of Circle Object System
////////////////////////////////////////////////////////
function Trig_GCOS_Main_Actions takes nothing returns nothing
if udg_GCOS_Instance == 0 then
set udg_GCOS_Instance = CreateGCOS(udg_GCOS_Angle, udg_GCOS_CenterX, udg_GCOS_CenterY, udg_GCOS_RadiusX, udg_GCOS_RadiusY, udg_GCOS_NumPoints, udg_GCOS_Tilt,udg_GCOS_Rotate)
else
call DestroyGCOS(udg_GCOS_Instance)
endif
endfunction
function Trig_GCOS_Main_Conditions takes nothing returns boolean
call UpdateGCOS(udg_GCOS_Instance)
return false
endfunction
//===========================================================================
function InitTrig_GCOS_Main takes nothing returns nothing
set gg_trg_GCOS_Main = CreateTrigger( )
call TriggerAddAction( gg_trg_GCOS_Main, function Trig_GCOS_Main_Actions )
call TriggerAddCondition( gg_trg_GCOS_Main, Condition(function Trig_GCOS_Main_Conditions) )
endfunction
function CircleWithUnits takes nothing returns nothing
local integer i = 1
local integer circleID = CreateGCOS(0,2500,2500,500,500,10,0,0)
loop
exitwhen i > 10
//call SaveUnitHandle( udg_GCOS_Hashtable, circleID, 100 + i, CreateUnit(Player(0),'hfoo',0,0,0) )
call SetGCOSUnit(circleID, i, CreateUnit(Player(0),'hfoo',0,0,0))
set i = i + 1
endloop
call UpdateGCOS(circleID)
endfunction
//===========================================================================
function InitTrig_JASS_Circle_With_Units takes nothing returns nothing
set gg_trg_JASS_Circle_With_Units = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_JASS_Circle_With_Units, 0.02)
call TriggerAddAction( gg_trg_JASS_Circle_With_Units, function CircleWithUnits )
endfunction
function Trig_Untitled_Trigger_001_Actions_Copy takes nothing returns nothing
local integer i = 1
local integer circleID = 23
call SetGCOSRadiusX(23,150)
call SetGCOSRadiusY(23,750)
call SetGCOSTilt(23,bj_PI/4)
call UpdateGCOS(23)
return
loop
exitwhen i > 10
call RemoveUnit(LoadUnitHandle(udg_GCOS_Hashtable, circleID, 100 + i))
set i = i + 1
endloop
call DestroyGCOS(circleID)
endfunction
//===========================================================================
function InitTrig_JASS_Circle_Update takes nothing returns nothing
set gg_trg_JASS_Circle_Update = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_JASS_Circle_Update, 2 )
call TriggerAddAction( gg_trg_JASS_Circle_Update, function Trig_Untitled_Trigger_001_Actions_Copy )
endfunction
function DislocateGCOSUnits takes integer circleID returns nothing
local integer numPoints = LoadInteger(udg_GCOS_Hashtable, circleID, 5)
local integer pointNumber = 1
local integer newPointNumber
local unit pointUnit
local unit tempUnit
set tempUnit = LoadUnitHandle(udg_GCOS_Hashtable, circleID, 101 )
loop
if pointNumber == numPoints then
set newPointNumber = 1
else
set newPointNumber = pointNumber + 1
endif
set pointUnit = tempUnit
set tempUnit = LoadUnitHandle(udg_GCOS_Hashtable, circleID, 100 + newPointNumber )
if pointUnit != null then
call BJDebugMsg(I2S(pointNumber))
call SetUnitX(pointUnit, LoadReal(udg_GCOS_Hashtable, -circleID, newPointNumber ))
call SetUnitY(pointUnit, LoadReal(udg_GCOS_Hashtable, -circleID, -newPointNumber ))
call SaveUnitHandle(udg_GCOS_Hashtable, circleID, 100 + newPointNumber, pointUnit)
call RemoveSavedHandle(udg_GCOS_Hashtable, circleID, 100+ pointNumber)
endif
exitwhen newPointNumber == 1
set pointNumber = pointNumber + 1
endloop
endfunction
function Trig_GCOS_Main_Conditions takes nothing returns boolean
if udg_GCOS_SpinUnits then
call DislocateGCOSUnits(udg_GCOS_Instance)
set udg_GCOS_SpinUnits = false
else
call UpdateGCOS(udg_GCOS_Instance)
endif
return false
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_005 takes nothing returns nothing
set gg_trg_Untitled_Trigger_005 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_005, function Trig_Untitled_Trigger_005_Actions )
endfunction