- Joined
- Feb 22, 2013
- Messages
- 161
JASS:
function Melee_Initialization_Actions takes nothing returns nothing
call FogModifierStart(CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, gg_rct_Horde_Area, true, false))
call FogModifierStart(CreateFogModifierRect(Player(1), FOG_OF_WAR_VISIBLE, gg_rct_Alliance_Area, true, false))
call FogModifierStart(CreateFogModifierRect(Player(2), FOG_OF_WAR_VISIBLE, gg_rct_Alliance_Area, true, false))
call FogModifierStart(CreateFogModifierRect(Player(10), FOG_OF_WAR_VISIBLE, gg_rct_Horde_Area, true, false))
if GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(0)) == MAP_CONTROL_USER then
set udg_RedIsPlaying = true
call BJDebugMsg("Red is playing and is a user.")
endif
if GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(1)) == MAP_CONTROL_USER then
set udg_BlueIsPlaying = true
call BJDebugMsg("Blue is playing and is a user.")
endif
if GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(2)) == MAP_CONTROL_USER then
set udg_TealIsPlaying = true
call BJDebugMsg("Teal is playing and is a user.")
endif
if GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING and GetPlayerController(Player(10)) == MAP_CONTROL_USER then
set udg_DarkGreenIsPlaying = true
call BJDebugMsg("Dark Green is playing and is a user.")
endif
if udg_RedIsPlaying == false then
call StartMeleeAI(Player(0), "orc.ai")
endif
if udg_BlueIsPlaying == false then
call StartMeleeAI(Player(1), "human.ai")
endif
if udg_TealIsPlaying == false then
call StartMeleeAI(Player(2), "elf.ai")
endif
if udg_DarkGreenIsPlaying == false then
call StartMeleeAI(Player(10), "undead.ai")
endif
endfunction
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerAddAction( t, function Melee_Initialization_Actions )
set t = null
endfunction
When I begin the game, it seems like this trigger doesn't run, it's supposed to start at map init, and I have the map init thing checked as well... Is there anything wrong with this?