Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- -- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
- --
- -- load the gametype script --
- ScriptCB_DoFile("setup_teams")
- ScriptCB_DoFile("ObjectiveConquest")
- function fLowHealthSound()
- print("ME5_MiscFunctions: fLowHealthSound()")
- ScriptCB_SndPlaySound("organic_lowhealth_property")
- ScriptCB_SndBusFade("lowhealth", 0.0, 0.0)
- local isSoundPlaying = false
- local busEndGain = 0.05
- local busFadeTime = 1.0
- local playerMaxHealth = 0
- local testcheckhumanspawn = OnCharacterSpawn(
- function(player)
- if IsCharacterHuman(player) then
- Iamhuman = GetEntityPtr(GetCharacterUnit(player))
- playerMaxHealth = GetObjectHealth(player)
- print("fLowHealthSound: Player's max health is "..playerMaxHealth)
- end
- end
- )
- local lowhealthsound = OnObjectDamage(
- function(object, damager)
- local playerCurHealth = GetObjectHealth(object)
- local playerHealthPercent = playerCurHealth / playerMaxHealth
- if Iamhuman == GetEntityPtr(object) then
- print("fLowHealthSound: Player damaged")
- if playerHealthPercent < 0.9 then
- print("fLowHealthSound: Player's health is "..playerCurHealth)
- if isSoundPlaying == false then
- print("fLowHealthSound: isSoundPlaying is false, setting to true")
- isSoundPlaying = true
- ScriptCB_SndBusFade("main", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("soundfx", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("battlechatter", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("music", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("ingamemusic", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("ambience", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("voiceover", busFadeTime, busEndGain)
- ScriptCB_SndBusFade("lowhealth", 1.0, 1.0)
- end
- else
- isSoundPlaying = false
- ScriptCB_SndBusFade("main", busFadeTime, 1.0)
- ScriptCB_SndBusFade("soundfx", busFadeTime, 0.7)
- ScriptCB_SndBusFade("battlechatter", busFadeTime, 1.0)
- ScriptCB_SndBusFade("music", busFadeTime, 1.0)
- ScriptCB_SndBusFade("ingamemusic", busFadeTime, 0.7)
- ScriptCB_SndBusFade("ambience", busFadeTime, 0.7)
- ScriptCB_SndBusFade("voiceover", busFadeTime, 0.8)
- ScriptCB_SndBusFade("lowhealth", 0.0, 1.0)
- end
- end
- end
- )
- local lowhealthplayerdeath = OnCharacterDeath(
- function(player,killer)
- if IsCharacterHuman(player) then
- print("fLowHealthSound: Player died, resetting buses and variables")
- if isSoundPlaying == true then
- isSoundPlaying = false
- ScriptCB_SndBusFade("main", busFadeTime, 1.0)
- ScriptCB_SndBusFade("soundfx", busFadeTime, 0.7)
- ScriptCB_SndBusFade("battlechatter", busFadeTime, 1.0)
- ScriptCB_SndBusFade("music", busFadeTime, 1.0)
- ScriptCB_SndBusFade("ingamemusic", busFadeTime, 0.7)
- ScriptCB_SndBusFade("ambience", busFadeTime, 0.7)
- ScriptCB_SndBusFade("voiceover", busFadeTime, 0.8)
- ScriptCB_SndBusFade("lowhealth", 0.0, 1.0)
- end
- else end
- end
- )
- end
- function ScriptPostLoad()
- fLowHealthSound()
- DisableBarriers("dropship")
- DisableBarriers("shield_03")
- DisableBarriers("shield_02")
- DisableBarriers("shield_01")
- DisableBarriers("ctf")
- DisableBarriers("ctf1")
- DisableBarriers("ctf2")
- DisableBarriers("ctf3")
- DisableBarriers("coresh1")
- EnableSPHeroRules()
- cp1 = CommandPost:New{name = "CP1_CON"}
- cp2 = CommandPost:New{name = "CP2_CON"}
- cp4 = CommandPost:New{name = "CP4_CON"}
- cp5 = CommandPost:New{name = "CP5_CON"}
- cp7 = CommandPost:New{name = "CP7_CON"}
- conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}
- conquest:AddCommandPost(cp1)
- conquest:AddCommandPost(cp2)
- conquest:AddCommandPost(cp4)
- conquest:AddCommandPost(cp5)
- conquest:AddCommandPost(cp7)
- conquest:Start()
- AddAIGoal(1, "conquest", 100)
- AddAIGoal(2, "conquest", 100)
- AddAIGoal(B1FODDER, "deathmatch", 100)
- AddAIGoal(B1SPECIAL, "conquest", 100)
- SetProperty("CP1_CON", "AllyPath", "CP1JERKPATH")
- SetProperty("CP2_CON", "AllyPath", "CP2JERKPATH")
- SetProperty("CP4_CON", "AllyPath", "CP4JERKPATH")
- SetProperty("CP5_CON", "AllyPath", "CP5JERKPATH")
- SetProperty("CP7_CON", "AllyPath", "CP7JERKPATH")
- end
- function ScriptInit()
- -- Designers, these two lines *MUST* be first!
- StealArtistHeap(2048 * 1024)
- SetPS2ModelMemory(4000000)
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\ingame.lvl")
- ReadDataFile("ingame.lvl")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\ingame.lvl")
- REP = 1
- CIS = 2
- B1FODDER = 3
- B1SPECIAL = 4
- ATT = 1
- DEF = 2
- ReadDataFile("sound\\myg.lvl;myg1cw")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\SOUND\\tcw.lvl;tcwcw")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\SIDE\\militia.lvl",
- "rep_inf_tcw_rifleman_militia",
- "rep_inf_tcw_heavy_militia",
- "rep_inf_tcw_engineer_militia",
- "rep_inf_tcw_sniper_militia",
- "rep_inf_tcw_elite_militia",
- "rep_inf_tcw_medic_militia")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\SIDE\\cis.lvl",
- "cis_inf_B1",
- "cis_inf_B2",
- "cis_inf_B2HA",
- "cis_inf_B2RP",
- "cis_inf_IG100",
- "cis_inf_BX_rifleman",
- "cis_inf_BX_sniper",
- "cis_inf_droideka",
- "cis_inf_B1_airdroid",
- "cis_inf_B1_sergeant")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\SIDE\\ar169.lvl",
- "BX_sniper_scope")
- ReadDataFile("..\\..\\addon\\TCW\\data\\_LVL_PC\\SIDE\\icons.lvl")
- ReadDataFile("SIDE\\tur.lvl",
- "tur_bldg_recoilless_lg")
- SetupTeams{
- rep = {
- team = REP,
- units = 24,
- reinforcements = 300,
- class1 = { "rep_inf_tcw_engineer_militia",3, 5},
- class2 = { "rep_inf_tcw_heavy_militia",3, 4},
- class3 = { "rep_inf_tcw_sniper_militia",3, 5},
- class4 = { "rep_inf_tcw_rifleman_militia",3, 5},
- class5 = { "rep_inf_tcw_medic_militia",3, 4},
- class6 = { "rep_inf_tcw_elite_militia",3, 4},
- },
- cis = {
- team = CIS,
- units = 18,
- reinforcements = 300,
- class1 = { "cis_inf_BX_rifleman",2, 3},
- class2 = { "cis_inf_BX_sniper",1, 2},
- class3 = { "cis_inf_B2HA",2, 3},
- class4 = { "cis_inf_B2",4, 5},
- class5 = { "cis_inf_B2RP",2, 3},
- -- class6 = { "cis_inf_B1",1, 3},
- class7 = { "cis_inf_droideka",1, 2},
- class8 = { "cis_inf_IG100", 0, 2},
- -- class9 = { "cis_inf_recondroid",0, 2},
- }
- }
- -- SetHeroClass(CIS, "cis_hero_darthmaul")
- -- SetHeroClass(REP, "rep_hero_obiwan")
- SetTeamName(B1FODDER, CIS)
- SetTeamIcon(B1FODDER, "cis_icon")
- SetUnitCount(B1FODDER, 12)
- AddUnitClass(B1FODDER, "cis_inf_B1", 12)
- SetTeamName(B1SPECIAL, CIS)
- SetTeamIcon(B1SPECIAL, "cis_icon")
- SetUnitCount(B1SPECIAL, 3)
- AddUnitClass(B1SPECIAL, "cis_inf_B1_sergeant", 1)
- AddUnitClass(B1SPECIAL, "cis_inf_B1_airdroid", 2)
- SetTeamAsEnemy(REP,B1FODDER)
- SetTeamAsEnemy(B1FODDER,REP)
- SetTeamAsFriend(CIS,B1FODDER)
- SetTeamAsFriend(B1FODDER,CIS)
- SetTeamAsFriend(B1FODDER,B1SPECIAL)
- SetTeamAsFriend(B1SPECIAL,B1FODDER)
- SetTeamAsEnemy(REP,B1SPECIAL)
- SetTeamAsEnemy(B1SPECIAL,REP)
- SetTeamAsFriend(CIS,B1SPECIAL)
- SetTeamAsFriend(B1SPECIAL,CIS)
- -- Level Stats
- ClearWalkers()
- AddWalkerType(0, 4)
- AddWalkerType(2, 0)
- local weaponCnt = 230
- SetMemoryPoolSize("Aimer", 60)
- SetMemoryPoolSize("AmmoCounter", weaponCnt)
- SetMemoryPoolSize("BaseHint", 250)
- SetMemoryPoolSize("EnergyBar", weaponCnt)
- SetMemoryPoolSize("EntityCloth", 19)
- SetMemoryPoolSize("EntityHover", 7)
- SetMemoryPoolSize("EntityFlyer", 6)
- SetMemoryPoolSize("SoldierAnimation", 400)
- SetMemoryPoolSize("EntitySoundStream", 1)
- SetMemoryPoolSize("EntitySoundStatic", 76)
- SetMemoryPoolSize("MountedTurret", 16)
- SetMemoryPoolSize("Navigator", 50)
- SetMemoryPoolSize("Obstacle", 500)
- SetMemoryPoolSize("PathNode", 256)
- SetMemoryPoolSize("TreeGridStack", 275)
- SetMemoryPoolSize("UnitAgent", 50)
- SetMemoryPoolSize("UnitController", 50)
- SetMemoryPoolSize("Weapon", weaponCnt)
- SetSpawnDelay(10.0, 0.25)
- ReadDataFile("myg\\myg1.lvl", "myg1_conquest")
- SetDenseEnvironment("false")
- AddDeathRegion("deathregion")
- SetMaxFlyHeight(20)
- SetMaxPlayerFlyHeight(20)
- -- Sound Stats
- voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
- AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
- AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
- voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
- AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
- OpenAudioStream("sound\\global.lvl", "cw_music")
- OpenAudioStream("sound\\myg.lvl", "myg1")
- OpenAudioStream("sound\\myg.lvl", "myg1")
- -- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
- -- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
- -- OpenAudioStream("sound\\myg.lvl", "myg1_emt")
- SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
- SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
- SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
- SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
- SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
- SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
- SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
- SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)
- SetOutOfBoundsVoiceOver(1, "Repleaving")
- SetOutOfBoundsVoiceOver(2, "Cisleaving")
- SetAmbientMusic(REP, 1.0, "rep_myg_amb_start", 0,1)
- SetAmbientMusic(REP, 0.8, "rep_myg_amb_middle", 1,1)
- SetAmbientMusic(REP, 0.2,"rep_myg_amb_end", 2,1)
- SetAmbientMusic(CIS, 1.0, "cis_myg_amb_start", 0,1)
- SetAmbientMusic(CIS, 0.8, "cis_myg_amb_middle", 1,1)
- SetAmbientMusic(CIS, 0.2,"cis_myg_amb_end", 2,1)
- SetVictoryMusic(REP, "rep_myg_amb_victory")
- SetDefeatMusic (REP, "rep_myg_amb_defeat")
- SetVictoryMusic(CIS, "cis_myg_amb_victory")
- SetDefeatMusic (CIS, "cis_myg_amb_defeat")
- SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
- SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
- --SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
- --SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
- SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
- SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
- SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
- SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
- SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
- --Camera Shizzle--
- -- Collector Shot
- AddCameraShot(0.008315, 0.000001, -0.999965, 0.000074, -64.894348, 5.541570, 201.711090);
- AddCameraShot(0.633584, -0.048454, -0.769907, -0.058879, -171.257629, 7.728924, 28.249359);
- AddCameraShot(-0.001735, -0.000089, -0.998692, 0.051092, -146.093109, 4.418306, -167.739212);
- AddCameraShot(0.984182, -0.048488, 0.170190, 0.008385, 1.725611, 8.877428, 88.413887);
- AddCameraShot(0.141407, -0.012274, -0.986168, -0.085598, -77.743042, 8.067328, 42.336128);
- AddCameraShot(0.797017, 0.029661, 0.602810, -0.022434, -45.726467, 7.754435, -47.544712);
- AddCameraShot(0.998764, 0.044818, -0.021459, 0.000963, -71.276566, 4.417432, 221.054550);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement