- Joined
- Mar 15, 2012
- Messages
- 2,878
How do vjass'ers clean their one time triggers? Does endfunction do it for them?
initializer
, they are not actually hooked to trigger, but injected into main
, which runs when the map loads. function main also calls Init..., which calls the init functions for each separate GUI Trigger, shall there be one of courseif you mean GUI "Map Initialization" triggers, it doesnt. If you meaninitializer
, they are not actually hooked to trigger, but injected intomain
, which runs when the map loads. function main also calls Init..., which calls the init functions for each separate GUI Trigger, shall there be one of course
Nobody cares about clearing them much.
Blah blah blah, when did you last time received a crash?
struct s
private static method onInit takes nothing returns nothing
//code
endmethod
endstruct
globals
// Generated
trigger gg_trg_h= null
//JASSHelper struct globals:
constant integer si__s=1
integer si__s_F=0
integer si__s_I=0
integer array si__s_V
endglobals
//Generated allocator of s
function s__s__allocate takes nothing returns integer
local integer this=si__s_F
if (this!=0) then
set si__s_F=si__s_V[this]
else
set si__s_I=si__s_I+1
set this=si__s_I
endif
if (this>8190) then
return 0
endif
set si__s_V[this]=-1
return this
endfunction
//Generated destructor of s
function s__s_deallocate takes integer this returns nothing
if this==null then
return
elseif (si__s_V[this]!=-1) then
return
endif
set si__s_V[this]=si__s_F
set si__s_F=this
endfunction
//===========================================================================
//
// Just another Warcraft III map
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Mon Jul 07 20:33:10 2014
// Map Author: Unknown
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: h
//===========================================================================
//TESH.scrollpos=0
//TESH.alwaysfold=0
function s__s_onInit takes nothing returns nothing
//code
endfunction
a//===========================================================================
function InitCustomTriggers takes nothing returns nothing
//Function not found: call InitTrig_h()
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 InitBlizzard()
call ExecuteFunc("jasshelper__initstructs44332426")
call InitGlobals()
call InitCustomTriggers()
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, - 1856.0, 832.0)
// Player setup
call InitCustomPlayerSlots()
call SetPlayerSlotAvailable(Player(0), MAP_CONTROL_USER)
call InitGenericPlayerSlots()
endfunction
//Struct method generated initializers/callers:
function jasshelper__initstructs44332426 takes nothing returns nothing
call ExecuteFunc("s__s_onInit")
endfunction