Name | Type | is_array | initial_value |
A_Team_Ready | boolean | No | |
NumberOfBombers1 | real | No | |
NumberOfBombers2 | real | No | |
Team1 | force | No | |
Team1Bombers | group | No | |
Team1Ready | real | No | |
Team2 | force | No | |
Team2Bombers | group | No | |
Team2Ready | real | No | |
Timer | timer | No |
function Trig_Bomb_Explode_Effect_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nglm' ) ) then
return false
endif
return true
endfunction
function Trig_Bomb_Explode_Effect_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h002', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetDyingUnit()), GetRandomDirectionDeg() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Bomb_Explode_Effect takes nothing returns nothing
set gg_trg_Bomb_Explode_Effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bomb_Explode_Effect, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Bomb_Explode_Effect, Condition( function Trig_Bomb_Explode_Effect_Conditions ) )
call TriggerAddAction( gg_trg_Bomb_Explode_Effect, function Trig_Bomb_Explode_Effect_Actions )
endfunction
function Trig_Inittialization_Func005A takes nothing returns nothing
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, GetEntireMapRect() )
call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
endfunction
function Trig_Inittialization_Func021Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Inittialization_Func021A takes nothing returns nothing
if ( Trig_Inittialization_Func021Func001C() ) then
call GroupAddUnitSimple( GetEnumUnit(), udg_Team2Bombers )
else
call DoNothing( )
endif
endfunction
function Trig_Inittialization_Func022Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Inittialization_Func022A takes nothing returns nothing
if ( Trig_Inittialization_Func022Func001C() ) then
call GroupAddUnitSimple( GetEnumUnit(), udg_Team1Bombers )
else
call DoNothing( )
endif
endfunction
function Trig_Inittialization_Actions takes nothing returns nothing
call CinematicFadeBJ( bj_CINEFADETYPE_FADEIN, 3.50, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 100.00, 0 )
call SetSkyModel( "Environment\\Sky\\LordaeronWinterSky\\LordaeronWinterSky.mdl" )
call SetTimeOfDay( 12 )
call SetTimeOfDayScalePercentBJ( 0.00 )
call ForForce( GetPlayersAll(), function Trig_Inittialization_Func005A )
set udg_NumberOfBombers1 = 5.00
set udg_NumberOfBombers2 = 5.00
call SetWaterBaseColorBJ( 0.00, 70.00, 100.00, 0 )
call ForceAddPlayerSimple( Player(0), udg_Team1 )
call ForceAddPlayerSimple( Player(1), udg_Team1 )
call ForceAddPlayerSimple( Player(2), udg_Team1 )
call ForceAddPlayerSimple( Player(3), udg_Team1 )
call ForceAddPlayerSimple( Player(4), udg_Team1 )
call ForceAddPlayerSimple( Player(5), udg_Team1 )
call ForceAddPlayerSimple( Player(6), udg_Team2 )
call ForceAddPlayerSimple( Player(7), udg_Team2 )
call ForceAddPlayerSimple( Player(8), udg_Team2 )
call ForceAddPlayerSimple( Player(9), udg_Team2 )
call ForceAddPlayerSimple( Player(10), udg_Team2 )
call ForceAddPlayerSimple( Player(11), udg_Team2 )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Optical2), function Trig_Inittialization_Func021A )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Optical1), function Trig_Inittialization_Func022A )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "TRIGSTR_034" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_030", "TRIGSTR_031", "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_028", "TRIGSTR_029", "ReplaceableTextures\\CommandButtons\\BTNDevotion.blp" )
call EnableTrigger( gg_trg_Team_1_Ready )
call EnableTrigger( gg_trg_Team_2_Ready )
endfunction
//===========================================================================
function InitTrig_Inittialization takes nothing returns nothing
set gg_trg_Inittialization = CreateTrigger( )
call TriggerAddAction( gg_trg_Inittialization, function Trig_Inittialization_Actions )
endfunction
function Trig_Unit_Configuration_Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(0)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func002C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func004C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func005C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func006C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func007C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(6)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func008C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func009C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func011C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func012C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_EMPTY ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func013Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func013A takes nothing returns nothing
if ( Trig_Unit_Configuration_Func013Func001C() ) then
call GroupAddUnitSimple( GetEnumUnit(), udg_Team1Bombers )
else
call DoNothing( )
endif
endfunction
function Trig_Unit_Configuration_Func014Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Configuration_Func014A takes nothing returns nothing
if ( Trig_Unit_Configuration_Func014Func001C() ) then
call GroupAddUnitSimple( GetEnumUnit(), udg_Team2Bombers )
else
call DoNothing( )
endif
endfunction
function Trig_Unit_Configuration_Actions takes nothing returns nothing
if ( Trig_Unit_Configuration_Func001C() ) then
call RemoveUnit( gg_unit_h000_0001 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func002C() ) then
call RemoveUnit( gg_unit_h000_0019 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func003C() ) then
call RemoveUnit( gg_unit_h000_0020 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func004C() ) then
call RemoveUnit( gg_unit_h000_0021 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func005C() ) then
call RemoveUnit( gg_unit_h000_0022 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func006C() ) then
call RemoveUnit( gg_unit_h000_0023 )
set udg_NumberOfBombers1 = ( udg_NumberOfBombers1 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func007C() ) then
call RemoveUnit( gg_unit_h000_0024 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func008C() ) then
call RemoveUnit( gg_unit_h000_0025 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func009C() ) then
call RemoveUnit( gg_unit_h000_0026 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func010C() ) then
call RemoveUnit( gg_unit_h000_0027 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func011C() ) then
call RemoveUnit( gg_unit_h000_0028 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
if ( Trig_Unit_Configuration_Func012C() ) then
call RemoveUnit( gg_unit_h000_0029 )
set udg_NumberOfBombers2 = ( udg_NumberOfBombers2 - 1 )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Optical1), function Trig_Unit_Configuration_Func013A )
call ForGroupBJ( GetUnitsInRectAll(gg_rct_Optical2), function Trig_Unit_Configuration_Func014A )
endfunction
//===========================================================================
function InitTrig_Unit_Configuration takes nothing returns nothing
set gg_trg_Unit_Configuration = CreateTrigger( )
call TriggerAddAction( gg_trg_Unit_Configuration, function Trig_Unit_Configuration_Actions )
endfunction
function Trig_Mine_Ability_1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_Team1Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mine_Ability_1_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A000', GetEnteringUnit() )
endfunction
//===========================================================================
function InitTrig_Mine_Ability_1 takes nothing returns nothing
set gg_trg_Mine_Ability_1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Mine_Ability_1, gg_rct_MineField1 )
call TriggerAddCondition( gg_trg_Mine_Ability_1, Condition( function Trig_Mine_Ability_1_Conditions ) )
call TriggerAddAction( gg_trg_Mine_Ability_1, function Trig_Mine_Ability_1_Actions )
endfunction
function Trig_Mine_Ability_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_Team2Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mine_Ability_2_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A000', GetEnteringUnit() )
endfunction
//===========================================================================
function InitTrig_Mine_Ability_2 takes nothing returns nothing
set gg_trg_Mine_Ability_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Mine_Ability_2, gg_rct_MineField2 )
call TriggerAddCondition( gg_trg_Mine_Ability_2, Condition( function Trig_Mine_Ability_2_Conditions ) )
call TriggerAddAction( gg_trg_Mine_Ability_2, function Trig_Mine_Ability_2_Actions )
endfunction
function Trig_Mine_Ability_Remove_1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLeavingUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetLeavingUnit(), udg_Team1Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mine_Ability_Remove_1_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A000', GetLeavingUnit() )
endfunction
//===========================================================================
function InitTrig_Mine_Ability_Remove_1 takes nothing returns nothing
set gg_trg_Mine_Ability_Remove_1 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_Mine_Ability_Remove_1, gg_rct_MineField1 )
call TriggerAddCondition( gg_trg_Mine_Ability_Remove_1, Condition( function Trig_Mine_Ability_Remove_1_Conditions ) )
call TriggerAddAction( gg_trg_Mine_Ability_Remove_1, function Trig_Mine_Ability_Remove_1_Actions )
endfunction
function Trig_Mine_Ability_Remove_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLeavingUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetLeavingUnit(), udg_Team2Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Mine_Ability_Remove_2_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A000', GetLeavingUnit() )
endfunction
//===========================================================================
function InitTrig_Mine_Ability_Remove_2 takes nothing returns nothing
set gg_trg_Mine_Ability_Remove_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Mine_Ability_Remove_2, gg_rct_MineField2 )
call TriggerAddCondition( gg_trg_Mine_Ability_Remove_2, Condition( function Trig_Mine_Ability_Remove_2_Conditions ) )
call TriggerAddAction( gg_trg_Mine_Ability_Remove_2, function Trig_Mine_Ability_Remove_2_Actions )
endfunction
function Trig_Unit_Dying_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetDyingUnit(), udg_Team1Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Dying_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetDyingUnit(), udg_Team2Bombers) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unit_Dying_Actions takes nothing returns nothing
if ( Trig_Unit_Dying_Func001C() ) then
call SetUnitPositionLoc( GetDyingUnit(), GetRectCenter(gg_rct_RevivePoint1) )
call IssueImmediateOrderBJ( gg_unit_h001_0000, "resurrection" )
else
call DoNothing( )
endif
if ( Trig_Unit_Dying_Func002C() ) then
call SetUnitPositionLoc( GetDyingUnit(), GetRectCenter(gg_rct_RevivePoint2) )
call IssueImmediateOrderBJ( gg_unit_h001_0015, "resurrection" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Unit_Dying takes nothing returns nothing
set gg_trg_Unit_Dying = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unit_Dying, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Unit_Dying, function Trig_Unit_Dying_Actions )
endfunction
function Trig_Power_Cog_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Cog_Func008Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Cog_Func008A takes nothing returns nothing
if ( Trig_Power_Cog_Func008Func001C() ) then
call RemoveItem( GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_Power_Cog_Func014002 takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_RevivePoint1) )
endfunction
function Trig_Power_Cog_Func015002 takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_RevivePoint2) )
endfunction
function Trig_Power_Cog_Func016A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical1 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_RevivePoint1), 0.00 )
endfunction
function Trig_Power_Cog_Func017A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical2 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_RevivePoint2), 0.00 )
endfunction
function Trig_Power_Cog_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_LUMBER )
set udg_Team1Ready = 0.00
set udg_Team2Ready = 0.00
set udg_A_Team_Ready = false
call EnableTrigger( gg_trg_Team_1_Ready )
call EnableTrigger( gg_trg_Team_2_Ready )
call RemoveItem( GetManipulatedItem() )
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_Power_Cog_Func008A )
call PauseTimerBJ( true, udg_Timer )
call PauseAllUnitsBJ( true )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + " |c008918EFis the one who aquired the cog! His team wins the round!|r" ) )
call TriggerSleepAction( 5.00 )
call PauseAllUnitsBJ( false )
call ForGroupBJ( udg_Team1Bombers, function Trig_Power_Cog_Func014002 )
call ForGroupBJ( udg_Team2Bombers, function Trig_Power_Cog_Func015002 )
call ForForce( udg_Team1, function Trig_Power_Cog_Func016A )
call ForForce( udg_Team2, function Trig_Power_Cog_Func017A )
endfunction
//===========================================================================
function InitTrig_Power_Cog takes nothing returns nothing
set gg_trg_Power_Cog = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Cog, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Power_Cog, Condition( function Trig_Power_Cog_Conditions ) )
call TriggerAddAction( gg_trg_Power_Cog, function Trig_Power_Cog_Actions )
endfunction
function Trig_Team_1_Ready_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Team_1_Ready_Func002Func001Func014A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical1 )
endfunction
function Trig_Team_1_Ready_Func002Func001Func015A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical2 )
endfunction
function Trig_Team_1_Ready_Func002Func001C takes nothing returns boolean
if ( not ( udg_A_Team_Ready == true ) ) then
return false
endif
return true
endfunction
function Trig_Team_1_Ready_Func002C takes nothing returns boolean
if ( not ( udg_Team1Ready != udg_NumberOfBombers1 ) ) then
return false
endif
return true
endfunction
function Trig_Team_1_Ready_Actions takes nothing returns nothing
if ( Trig_Team_1_Ready_Func002C() ) then
set udg_Team1Ready = ( udg_Team1Ready + 1 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetUnitLoc(GetEnteringUnit()), 0.00 )
else
if ( Trig_Team_1_Ready_Func002Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_042" )
call TriggerSleepAction( 5.00 )
call KillDestructable( gg_dest_ZTd7_0027 )
call SetDestructableAnimationBJ( gg_dest_ZTd7_0027, "death " )
call KillDestructable( gg_dest_ZTd7_0026 )
call SetDestructableAnimationBJ( gg_dest_ZTd7_0026, "death " )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_048" )
call PauseAllUnitsBJ( false )
call StartTimerBJ( udg_Timer, false, 20.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_071" )
call TimerDialogSetTitleColorBJ( GetLastCreatedTimerDialogBJ(), 0.00, 10.00, 100.00, 0 )
call TimerDialogSetTimeColorBJ( GetLastCreatedTimerDialogBJ(), 0.00, 100.00, 100.00, 0 )
call EnableTrigger( gg_trg_Mining_Time )
call ForForce( udg_Team1, function Trig_Team_1_Ready_Func002Func001Func014A )
call ForForce( udg_Team2, function Trig_Team_1_Ready_Func002Func001Func015A )
call DisableTrigger( GetTriggeringTrigger() )
else
set udg_A_Team_Ready = true
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_044" )
endif
endif
endfunction
//===========================================================================
function InitTrig_Team_1_Ready takes nothing returns nothing
set gg_trg_Team_1_Ready = CreateTrigger( )
call DisableTrigger( gg_trg_Team_1_Ready )
call TriggerRegisterEnterRectSimple( gg_trg_Team_1_Ready, gg_rct_Teleport1 )
call TriggerAddCondition( gg_trg_Team_1_Ready, Condition( function Trig_Team_1_Ready_Conditions ) )
call TriggerAddAction( gg_trg_Team_1_Ready, function Trig_Team_1_Ready_Actions )
endfunction
function Trig_Team_2_Ready_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'h000' ) ) then
return false
endif
return true
endfunction
function Trig_Team_2_Ready_Func002Func001Func014A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical1 )
endfunction
function Trig_Team_2_Ready_Func002Func001Func015A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical2 )
endfunction
function Trig_Team_2_Ready_Func002Func001C takes nothing returns boolean
if ( not ( udg_A_Team_Ready == true ) ) then
return false
endif
return true
endfunction
function Trig_Team_2_Ready_Func002C takes nothing returns boolean
if ( not ( udg_Team2Ready != udg_NumberOfBombers2 ) ) then
return false
endif
return true
endfunction
function Trig_Team_2_Ready_Actions takes nothing returns nothing
if ( Trig_Team_2_Ready_Func002C() ) then
set udg_Team2Ready = ( udg_Team2Ready + 1 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetUnitLoc(GetEnteringUnit()), 0.00 )
else
if ( Trig_Team_2_Ready_Func002Func001C() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_043" )
call TriggerSleepAction( 5.00 )
call KillDestructable( gg_dest_ZTd7_0027 )
call SetDestructableAnimationBJ( gg_dest_ZTd7_0027, "death " )
call KillDestructable( gg_dest_ZTd7_0026 )
call SetDestructableAnimationBJ( gg_dest_ZTd7_0026, "death " )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_049" )
call PauseAllUnitsBJ( false )
call StartTimerBJ( udg_Timer, false, 20.00 )
call CreateTimerDialogBJ( GetLastCreatedTimerBJ(), "TRIGSTR_073" )
call TimerDialogSetTitleColorBJ( GetLastCreatedTimerDialogBJ(), 0.00, 10.00, 100.00, 0 )
call TimerDialogSetTimeColorBJ( GetLastCreatedTimerDialogBJ(), 0.00, 100.00, 100.00, 0 )
call EnableTrigger( gg_trg_Mining_Time )
call ForForce( udg_Team1, function Trig_Team_2_Ready_Func002Func001Func014A )
call ForForce( udg_Team2, function Trig_Team_2_Ready_Func002Func001Func015A )
call DisableTrigger( GetTriggeringTrigger() )
else
set udg_A_Team_Ready = true
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_045" )
endif
endif
endfunction
//===========================================================================
function InitTrig_Team_2_Ready takes nothing returns nothing
set gg_trg_Team_2_Ready = CreateTrigger( )
call DisableTrigger( gg_trg_Team_2_Ready )
call TriggerRegisterEnterRectSimple( gg_trg_Team_2_Ready, gg_rct_Teleport2 )
call TriggerAddCondition( gg_trg_Team_2_Ready, Condition( function Trig_Team_2_Ready_Conditions ) )
call TriggerAddAction( gg_trg_Team_2_Ready, function Trig_Team_2_Ready_Actions )
endfunction
function Trig_Mining_Time_Func007A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_SpawnRegion2) )
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
function Trig_Mining_Time_Func008A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical2 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Teleport2), 0.00 )
endfunction
function Trig_Mining_Time_Func009A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), GetRectCenter(gg_rct_SpawnRegion1) )
call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
function Trig_Mining_Time_Func010A takes nothing returns nothing
call SetCameraBoundsToRectForPlayerBJ( GetEnumPlayer(), gg_rct_Optical1 )
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_SpawnRegion1), 0.00 )
endfunction
function Trig_Mining_Time_Func015A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Cog_Place2), 2.50 )
endfunction
function Trig_Mining_Time_Func016A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Cog_Place1), 2.50 )
endfunction
function Trig_Mining_Time_Func020A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Teleport2), 2.50 )
endfunction
function Trig_Mining_Time_Func021A takes nothing returns nothing
call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetRectCenter(gg_rct_Teleport1), 2.50 )
endfunction
function Trig_Mining_Time_Actions takes nothing returns nothing
call DestroyTimerDialogBJ( GetLastCreatedTimerDialogBJ() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_075" )
call DestructableRestoreLife( gg_dest_ZTd7_0027, GetDestructableMaxLife(GetLastCreatedDestructable()), true )
call DestructableRestoreLife( gg_dest_ZTd7_0026, GetDestructableMaxLife(GetLastCreatedDestructable()), true )
call PauseAllUnitsBJ( true )
call TriggerSleepAction( 2.00 )
call ForGroupBJ( udg_Team1Bombers, function Trig_Mining_Time_Func007A )
call ForForce( udg_Team1, function Trig_Mining_Time_Func008A )
call ForGroupBJ( udg_Team2Bombers, function Trig_Mining_Time_Func009A )
call ForForce( udg_Team2, function Trig_Mining_Time_Func010A )
call TriggerSleepAction( 3.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_076" )
call CreateItemLoc( 'I000', GetRectCenter(gg_rct_Cog_Place1) )
call CreateItemLoc( 'I000', GetRectCenter(gg_rct_Cog_Place2) )
call ForForce( udg_Team1, function Trig_Mining_Time_Func015A )
call ForForce( udg_Team2, function Trig_Mining_Time_Func016A )
call TriggerSleepAction( 2.50 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_077" )
call TriggerSleepAction( 5.00 )
call ForForce( udg_Team1, function Trig_Mining_Time_Func020A )
call ForForce( udg_Team2, function Trig_Mining_Time_Func021A )
call TriggerSleepAction( 2.50 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_078" )
call TriggerSleepAction( 6.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_083" )
call TriggerSleepAction( 1.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_080" )
call PlaySoundBJ( gg_snd_BattleNetTick )
call TriggerSleepAction( 1.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_081" )
call PlaySoundBJ( gg_snd_BattleNetTick )
call TriggerSleepAction( 1.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_082" )
call PlaySoundBJ( gg_snd_BattleNetTick )
call KillDestructable( gg_dest_ZTd7_0027 )
call KillDestructable( gg_dest_ZTd7_0026 )
call TriggerSleepAction( 1.00 )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_085" )
call PlaySoundBJ( gg_snd_Rescue )
call PauseAllUnitsBJ( false )
endfunction
//===========================================================================
function InitTrig_Mining_Time takes nothing returns nothing
set gg_trg_Mining_Time = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Mining_Time, udg_Timer )
call TriggerAddAction( gg_trg_Mining_Time, function Trig_Mining_Time_Actions )
endfunction