- Joined
- Aug 15, 2012
- Messages
- 318
Hello I just started redoing all my gui and converting it into vjass/jass which ever I can use to make it most efficient at the time is what I will use. But in reality I will prob be posting multiple triggers on here eventually but we will start with map initialization because its confusing me atm I did read deathismyfriend's tutorial and I learnt a lot however there are some things it didn't cover that I have and I cannot find natives for the few that I have if anyone can give me some help would be just chipper thanks
.
I know integer A is not good to use but I would like to try and replace it with a regular integer if anyone would like to help me what you see here may also not be what I have I am slowly changing things that I find solutions for.
JASS:
function Trig_Initialization_Func002Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Initialization_Actions takes nothing returns nothing
set udg_CreepTable = InitHashtable()
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Initialization_Func002Func001C() ) then
set udg_TempLoc1 = GetStartLocationLoc(ConvertedPlayer(GetForLoopIndexA()))
call CreateNUnitsAtLoc( 1, 'e000', ConvertedPlayer(GetForLoopIndexA()), udg_TempLoc1, bj_UNIT_FACING )
call AdjustPlayerStateBJ( 1, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_HERO_TOKENS )
call AdjustPlayerStateBJ( 10, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_FOOD_CAP_CEILING )
call AdjustPlayerStateBJ( 450, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 75, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_LUMBER )
call SelectUnitForPlayerSingle( gg_unit_n016_0068, ConvertedPlayer(GetForLoopIndexA()) )
call RemoveLocation(udg_TempLoc1)
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
// Initialize Systems
call TriggerExecute( gg_trg_NPS_Initialization )
call TriggerExecute( gg_trg_Load_Items )
call TriggerExecute( gg_trg_Order_Test )
call TriggerExecute( gg_trg_Icons )
call TriggerExecute( gg_trg_Indestructable_Doors )
call ConditionalTriggerExecute( gg_trg_Meet_the_King_Quest )
call ConditionalTriggerExecute( gg_trg_Setting )
call ConditionalTriggerExecute( gg_trg_Declaration )
call FogEnable(false)
call FogMaskEnable(false)
endfunction
//===========================================================================
function InitTrig_Initialization takes nothing returns nothing
set gg_trg_Initialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )
endfunction
Last edited: