Name | Type | is_array | initial_value |
AttackerIsAlive | boolean | Yes | true |
CageAnimHoldTimer | timer | Yes | |
CageAnimLock | boolean | Yes | |
CastingHellfire | boolean | Yes | |
ChargingThunderBall | boolean | Yes | |
ComputerPlayers | integer | No | |
DarkDummyGroup | group | Yes | |
DarkOrigin | unit | Yes | |
Dice | integer | No | |
FireDummyGroup | group | Yes | |
FrostDummy | unit | Yes | |
FrostSphere | boolean | Yes | |
Hammer | unit | Yes | |
Hero | unit | Yes | |
IsCastingFrostSphere | boolean | Yes | |
Move | group | No | |
MoveFast | group | No | |
MoveSlow | group | No | |
Picked | unit | No | |
PickedNail | unit | Yes | |
PickGroup | group | No | |
Players | integer | No | |
RockSummon | unit | Yes | |
TargetPoint | location | Yes | |
TempPoint1 | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
TempPoint4 | location | No | |
ThunderBall | unit | Yes | |
ThunderBallGroup | group | No | |
WindDistance | real | Yes |
function Trig_Unit_Move_Code_Enum takes nothing returns nothing
local unit u = GetEnumUnit()
call SetUnitPosition(u, GetUnitX(u)+27.0*Cos(GetUnitFacing(u)*0.01745), GetUnitY(u)+27.0*Sin(GetUnitFacing(u)*0.01745))
set u = null
endfunction
function Trig_Unit_Move_Code_Enum_Fast takes nothing returns nothing
local unit u = GetEnumUnit()
call SetUnitPosition(u, GetUnitX(u)+36.0*Cos(GetUnitFacing(u)*0.01745), GetUnitY(u)+36.0*Sin(GetUnitFacing(u)*0.01745))
set u = null
endfunction
function Trig_Unit_Move_Code_Enum_Slow takes nothing returns nothing
local unit u = GetEnumUnit()
call SetUnitPosition(u, GetUnitX(u)+18.0*Cos(GetUnitFacing(u)*0.01745), GetUnitY(u)+18.0*Sin(GetUnitFacing(u)*0.01745))
set u = null
endfunction
function Trig_Unit_Move_Code_Actions takes nothing returns nothing
call ForGroup(udg_Move, function Trig_Unit_Move_Code_Enum)
call ForGroup(udg_MoveFast, function Trig_Unit_Move_Code_Enum_Fast)
call ForGroup(udg_MoveSlow, function Trig_Unit_Move_Code_Enum_Slow)
endfunction
//===========================================================================
function InitTrig_Unit_Move_Code takes nothing returns nothing
set gg_trg_Unit_Move_Code = CreateTrigger()
call TriggerAddAction(gg_trg_Unit_Move_Code, function Trig_Unit_Move_Code_Actions)
call TriggerRegisterTimerEvent(gg_trg_Unit_Move_Code, 0.03, true)
endfunction
//===========================================================================
// The spells are meant to fit each other, so they are a bit complicated
// Everything is written in GUI, except the simple movement engine
// Hopefully the GUI is understandable enough, i added short comments
// to the triggers to assist in understanding them
// Those triggers may have some unecesary actions, but mostly i made
// them short as possible. Afaik may be better ways, but this is skill level
// Hopefully the GUI leaks is at minimum/none
// The Respawn and Initilaztion triggers are just to make the map
// more like a testing map, also to support multiplayer for 6 players.
// Also a very basic AI is made; also stupid :)
// There is something in the Respawn trigger which makes units explode
// artificially and removes the dummies being used, otherwise the
// triggers which is mainly focused for the spell contest is the Spells
// and Movement folder