//===========================================================================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Tue Jan 01 19:09:43 2008
// Map Author: Unknown
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
location udg_snowman = null
// Generated
trigger gg_trg_Melee_Initialization = null
trigger gg_trg_snowman_trail = null
endglobals
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p = Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'H000', -13.7, 72.7, 286.521 )
set u = CreateUnit( p, 'H000', -196.0, 65.6, 65.799 )
set u = CreateUnit( p, 'H000', -411.5, 65.6, 147.804 )
set u = CreateUnit( p, 'H000', -658.8, 58.6, 244.959 )
set u = CreateUnit( p, 'H000', -859.6, 63.3, 55.911 )
set u = CreateUnit( p, 'H000', 174.7, 70.3, 340.235 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
call CreateUnitsForPlayer0( )
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreatePlayerBuildings( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: Melee Initialization
//
// Default melee game initialization for all players
//===========================================================================
function Trig_Melee_Initialization_Actions takes nothing returns nothing
call MeleeStartingVisibility( )
call MeleeStartingHeroLimit( )
call MeleeGrantHeroItems( )
call MeleeStartingResources( )
call MeleeClearExcessUnits( )
call MeleeStartingUnits( )
call MeleeStartingAI( )
call MeleeInitVictoryDefeat( )
endfunction
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction
//===========================================================================
// Trigger: snowman trail
//===========================================================================
function Trig_snowman_trail_Func002A takes nothing returns nothing
set udg_snowman = GetUnitLoc(GetEnumUnit())
call SetTerrainTypeBJ( udg_snowman, 'Nsnw', -1, 1, 0 )
call RemoveLocation(udg_Point)
endfunction
function Trig_snowman_trail_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsOfTypeIdAll('H000'), function Trig_snowman_trail_Func002A )
endfunction
//===========================================================================
function InitTrig_snowman_trail takes nothing returns nothing
set gg_trg_snowman_trail = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_snowman_trail, 1.00 )
call TriggerAddAction( gg_trg_snowman_trail, function Trig_snowman_trail_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Melee_Initialization( )
call InitTrig_snowman_trail( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Melee_Initialization )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
call SetPlayerRaceSelectable( Player(0), true )
call SetPlayerController( Player(0), MAP_CONTROL_USER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_002
call SetPlayerTeam( Player(0), 0 )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "LordaeronSummerDay" )
call SetAmbientNightSound( "LordaeronSummerNight" )
call SetMapMusic( "Music", true, 0 )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "Just another Warcraft III map" )
call SetMapDescription( "Nondescript" )
call SetPlayers( 1 )
call SetTeams( 1 )
call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )
call DefineStartLocation( 0, -2527.6, -1967.3 )
// Player setup
call InitCustomPlayerSlots( )
call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
call InitGenericPlayerSlots( )
endfunction