1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
function Trig_Slayer_Turns_Func010A takes nothing returns nothing
call SetUnitOwner( GetEnumUnit(), Player(10), true )
endfunction
function Trig_Slayer_Turns_Func032Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerController(Player(9)) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Slayer_Turns_Func032Func001Func002C takes nothing returns boolean
if ( not ( GetPlayerController(Player(11)) == MAP_CONTROL_USER ) ) then
return false
endif
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Slayer_Turns_Func032Func001C takes nothing returns boolean
if ( Trig_Slayer_Turns_Func032Func001Func001C() ) then
return true
endif
if ( Trig_Slayer_Turns_Func032Func001Func002C() ) then
return true
endif
return false
endfunction
function Trig_Slayer_Turns_Func032C takes nothing returns boolean
if ( not Trig_Slayer_Turns_Func032Func001C() ) then
return false
endif
return true
endfunction
function Trig_Slayer_Turns_Actions takes nothing returns nothing
local integer PlayerNumber = udg_TurningPlayerNumber
local location DeathPoint = Location(GetStoredRealBJ("X", ( "SlayerDeathPoint" + I2S(PlayerNumber) ), GetLastCreatedGameCacheBJ()), GetStoredRealBJ("Y", ( "SlayerDeathPoint" + I2S(PlayerNumber) ), GetLastCreatedGameCacheBJ()))
local integer a = 1
local group TempGroup
call CreateItemLoc( 'I002', DeathPoint )
call ForceRemovePlayerSimple( Player(PlayerNumber - 1), udg_SlayerPlayers )
if ( GetPlayerSlotState(Player(PlayerNumber - 1)) == PLAYER_SLOT_STATE_PLAYING ) then
call ForceAddPlayerSimple( Player(PlayerNumber - 1), udg_AllPresentZombiePlayers )
endif
loop
exitwhen a > 10
set udg_DeathSplatPlayerId = PlayerNumber
call ConditionalTriggerExecute( gg_trg_Death_Splat )
call PolledWait( 0.03 )
set a = a + 1
endloop
call RemoveUnit( udg_DummySlayer[PlayerNumber] )
call PlaySoundBJ( gg_snd_HowlOfTerror )
set TempGroup = GetUnitsOfPlayerAndTypeId(Player(PlayerNumber - 1), 'nglm')
call ForGroupBJ( TempGroup, function Trig_Slayer_Turns_Func010A )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[PlayerNumber - 1], udg_SlayerPlayers, bj_ALLIANCE_UNALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[PlayerNumber - 1], bj_FORCE_PLAYER[PLAYER_NEUTRAL_PASSIVE], bj_ALLIANCE_UNALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[PlayerNumber - 1], udg_AllPresentZombiePlayers, bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[PlayerNumber - 1], udg_AllAbsentZombiePlayers, bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[PlayerNumber - 1], udg_Players10and12, bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( udg_SlayerPlayers, bj_FORCE_PLAYER[PlayerNumber - 1], bj_ALLIANCE_UNALLIED )
call SetForceAllianceStateBJ( udg_AllPresentZombiePlayers, bj_FORCE_PLAYER[PlayerNumber - 1], bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( udg_AllAbsentZombiePlayers, bj_FORCE_PLAYER[PlayerNumber - 1], bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( udg_Players10and12, bj_FORCE_PLAYER[PlayerNumber - 1], bj_ALLIANCE_ALLIED_VISION )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[10], bj_FORCE_PLAYER[PlayerNumber - 1], bj_ALLIANCE_UNALLIED )
call CreateUnitAtLoc( Player(PlayerNumber - 1), 'n006', DeathPoint, udg_SlayerFacing[PlayerNumber] )
call FlushStoredMissionBJ( ( "SlayerDeathPoint" + I2S(PlayerNumber) ), GetLastCreatedGameCacheBJ() )
call DisplayTextToForce( GetPlayersAll(), "OH SHIT!" )
call ConditionalTriggerExecute( gg_trg_Infested_MB )
call TriggerSleepAction( 1.00 )
call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(Player(PlayerNumber - 1)) + " HAS TURNED INTO A ZOMBIE!" ) )
call SetPlayerName( Player(PlayerNumber - 1), ( udg_PlayerNames[PlayerNumber] + " (Zombie)" ) )
call ConditionalTriggerExecute( gg_trg_Set_AI_Units )
if ( Trig_Slayer_Turns_Func032C() ) then
else
call ConditionalTriggerExecute( gg_trg_Set_Zombie_Ownership )
endif
set DeathPoint = null
set TempGroup = null
endfunction
//===========================================================================
function InitTrig_Slayer_Turns takes nothing returns nothing
set gg_trg_Slayer_Turns = CreateTrigger( )
call TriggerAddAction( gg_trg_Slayer_Turns, function Trig_Slayer_Turns_Actions )
endfunction
|