Hi all
working in jass arose problem, I did not want to use BJ
I used a local variable
Please tell me what this code is not so
thx, I newbie in Jass
sorry topic in the wrong section D:
working in jass arose problem, I did not want to use BJ
I used a local variable
Please tell me what this code is not so
JASS:
function Trig_StartGame_Condition takes nothing returns boolean
return ( GetPlayerSlotState(ConvertedPlayer(i)) == PLAYER_SLOT_STATE_PLAYING )
endfunction
function Trig_StartGame_Actions takes nothing returns nothing
local integer i = 1
set i = 1
loop
exitwhen i > 6
if ( Trig_StartGame_Condition() ) then
call CreateNUnitsAtLoc( 1, 'H003', ConvertedPlayer(i), udg_ArcherPoint[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))], 45.00 )
set udg_archer[GetConvertedPlayerId(ConvertedPlayer(i))] = GetLastCreatedUnit()
call UnitAddItemByIdSwapped( 'I001', GetLastCreatedUnit() )
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), ConvertedPlayer(i) )
call PanCameraToTimedLocForPlayer( ConvertedPlayer(i), GetUnitLoc(GetLastCreatedUnit()), 0.50 )
endif
set i = i + 1
endloop
set i = 7
loop
exitwhen i > 12
if ( Trig_StartGame_Condition() ) then
call CreateNUnitsAtLoc( 1, 'H003', ConvertedPlayer(i), udg_ArcherPoint[GetConvertedPlayerId(ConvertedPlayer(GetForLoopIndexA()))], 225.00 )
set udg_archer[GetConvertedPlayerId(ConvertedPlayer(i))] = GetLastCreatedUnit()
call UnitAddItemByIdSwapped( 'I001', GetLastCreatedUnit() )
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), ConvertedPlayer(i) )
call PanCameraToTimedLocForPlayer( ConvertedPlayer(i), GetUnitLoc(GetLastCreatedUnit()), 0.50 )
endif
set i = i + 1
endloop
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
function InitTrig_StartGame takes nothing returns nothing
set gg_trg_StartGame = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_StartGame, 1.10 )
call TriggerAddAction( gg_trg_StartGame, function Trig_StartGame_Actions )
endfunction
thx, I newbie in Jass
sorry topic in the wrong section D:

Last edited: