Advertisement
Guest User

cor1g_con

a guest
Apr 20th, 2014
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.56 KB | None | 0 0
  1. --
  2. -- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
  3. --
  4.  
  5. -- load the gametype script
  6. ScriptCB_DoFile("ObjectiveConquest")
  7. ScriptCB_DoFile("setup_teams")
  8.  
  9. --  Empire Attacking (attacker is always #1)
  10. ALL = 1
  11. IMP = 2
  12. --  These variables do not change
  13. ATT = 1
  14. DEF = 2
  15.  
  16.    
  17. function ScriptPostLoad()
  18.         EnableSPHeroRules()
  19.        
  20.         AddDeathRegion("Death")
  21.         AddDeathRegion("Death1")
  22.         AddDeathRegion("Death2")
  23.         AddDeathRegion("Death3")
  24.         AddDeathRegion("Death4")
  25.        
  26.        
  27.         SetProperty ("LibCase1","MaxHealth",1000)
  28.         SetProperty ("LibCase2","MaxHealth",1000)
  29.         SetProperty ("LibCase3","MaxHealth",1000)
  30.         SetProperty ("LibCase4","MaxHealth",1000)
  31.         SetProperty ("LibCase5","MaxHealth",1000)
  32.         SetProperty ("LibCase6","MaxHealth",1000)
  33.         SetProperty ("LibCase7","MaxHealth",1000)
  34.         SetProperty ("LibCase8","MaxHealth",1000)
  35.         SetProperty ("LibCase9","MaxHealth",1000)
  36.         SetProperty ("LibCase10","MaxHealth",1000)
  37.         SetProperty ("LibCase11","MaxHealth",1000)
  38.         SetProperty ("LibCase12","MaxHealth",1000)
  39.         SetProperty ("LibCase13","MaxHealth",1000)
  40.         SetProperty ("LibCase14","MaxHealth",1000)
  41.  
  42.  
  43.  
  44.         SetProperty ("LibCase1","CurHealth",1000)
  45.         SetProperty ("LibCase2","CurHealth",1000)
  46.         SetProperty ("LibCase3","CurHealth",1000)
  47.         SetProperty ("LibCase4","CurHealth",1000)
  48.         SetProperty ("LibCase5","CurHealth",1000)
  49.         SetProperty ("LibCase6","CurHealth",1000)
  50.         SetProperty ("LibCase7","CurHealth",1000)
  51.         SetProperty ("LibCase8","CurHealth",1000)
  52.         SetProperty ("LibCase9","CurHealth",1000)
  53.         SetProperty ("LibCase10","CurHealth",1000)
  54.         SetProperty ("LibCase11","CurHealth",1000)
  55.         SetProperty ("LibCase12","CurHealth",1000)
  56.         SetProperty ("LibCase13","CurHealth",1000)
  57.         SetProperty ("LibCase14","CurHealth",1000)
  58.  
  59.  
  60.     EnableSPHeroRules()
  61.             DisableBarriers("SideDoor1")
  62.             DisableBarriers("MainLibraryDoors")
  63.             DisableBarriers("SideDoor2")
  64.             DisableBarriers("SIdeDoor3")
  65.             DisableBarriers("ComputerRoomDoor1")
  66.             DisableBarriers("StarChamberDoor1")
  67.             DisableBarriers("StarChamberDoor2")
  68.             DisableBarriers("WarRoomDoor1")
  69.             DisableBarriers("WarRoomDoor2")
  70.             DisableBarriers("WarRoomDoor3")
  71.             PlayAnimation("DoorOpen01")
  72.             PlayAnimation("DoorOpen02")
  73.            
  74.                 --This defines the CPs.  These need to happen first
  75.     cp1 = CommandPost:New{name = "CP1"}
  76.     cp2 = CommandPost:New{name = "CP2"}
  77.     cp3 = CommandPost:New{name = "CP3"}
  78.     cp4 = CommandPost:New{name = "CP4"}
  79.     cp5 = CommandPost:New{name = "CP5"}
  80.     cp6 = CommandPost:New{name = "CP6"}
  81.    
  82.     --This sets up the actual objective.  This needs to happen after cp's are defined
  83.     conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
  84.                                      textATT = "game.modes.con",
  85.                                      textDEF = "game.modes.con2",
  86.                                      multiplayerRules = true}
  87.    
  88.     --This adds the CPs to the objective.  This needs to happen after the objective is set up
  89.     conquest:AddCommandPost(cp1)
  90.     conquest:AddCommandPost(cp2)
  91.     conquest:AddCommandPost(cp3)
  92.     conquest:AddCommandPost(cp4)
  93.     conquest:AddCommandPost(cp5)
  94.     conquest:AddCommandPost(cp6)
  95.    
  96.     conquest:Start()
  97.  end
  98.  
  99. function ScriptInit()
  100.     -- Designers, these two lines *MUST* be first.
  101.     SetPS2ModelMemory(4030000)
  102.     ReadDataFile("ingame.lvl")
  103.    
  104.    
  105.    
  106.     ReadDataFile("sound\\cor.lvl;cor1gcw")
  107.     SetMapNorthAngle(180, 1)
  108.     SetMaxFlyHeight(25)
  109.     SetMaxPlayerFlyHeight (25)
  110.     AISnipeSuitabilityDist(30)
  111.    
  112.      ReadDataFile("SIDE\\all.lvl",
  113.                     "all_bldg_defensegridturret",
  114.                     "all_inf_rifleman",
  115.                     "all_inf_rocketeer",
  116.                     "all_inf_engineer",
  117.                     "all_inf_sniper",
  118.                     "all_inf_officer",
  119.                     "all_inf_wookiee",
  120.                     "all_hero_luke_jedi")
  121.                
  122.                                
  123.                
  124.      ReadDataFile("SIDE\\imp.lvl",
  125.                     --Insert "imp_bldg_defensegridturret", once the odf has been set up
  126.                     "imp_inf_rifleman",
  127.                     "imp_inf_rocketeer",
  128.                     "imp_inf_engineer",
  129.                     "imp_inf_sniper",
  130.                     "imp_inf_officer",
  131.                     "imp_inf_dark_trooper",                  
  132.                     "imp_hero_emperor")
  133.              
  134.      ReadDataFile("SIDE\\rep.lvl",
  135.                     "rep_fly_assault_DOME",
  136.                     "rep_fly_gunship_DOME")
  137.                    
  138.     ReadDataFile("SIDE\\tur.lvl",
  139.                 "tur_bldg_laser")          
  140.      
  141.      
  142.     ReadDataFile("SIDE\\cis.lvl",
  143.                     "cis_fly_droidfighter_DOME")
  144.  
  145.     ReadDataFile("SIDE\\jed.lvl",
  146.         "jed_knight_01",
  147.         "jed_knight_02",
  148.         "jed_knight_03",
  149.         "jed_knight_04")
  150.  
  151.  
  152.  
  153.  
  154.    -- set up teams
  155.     SetupTeams{
  156.         imp = {
  157.             team = IMP,
  158.             units = 32,
  159.             reinforcements = 150,
  160.             turret = "all_bldg_defensegridturret",      --change this to imp_bldg_defensegridturret once the odf has been set up
  161.             soldier  = { "imp_inf_rifleman",7, 25},
  162.             assault  = { "imp_inf_rocketeer",1, 4},
  163.             engineer = { "imp_inf_engineer",1, 4},
  164.             sniper   = { "imp_inf_sniper",1, 4},
  165.             officer = {"imp_inf_officer",1, 4},
  166.             special = { "imp_inf_dark_trooper",1, 4},
  167.            
  168.         },
  169.         all = {
  170.             team = ALL,
  171.             units = 32,
  172.             reinforcements = 150,
  173.             turret = "all_bldg_defensegridturret",
  174.             soldier  = { "all_inf_rifleman",7, 25},
  175.             assault  = { "all_inf_rocketeer",1, 4},
  176.             engineer = { "all_inf_engineer",1, 4},
  177.             sniper   = { "all_inf_sniper",1, 4},
  178.             officer = {"all_inf_officer",1, 4},
  179.             special = { "all_inf_wookiee",1, 4},
  180.         }
  181.     }
  182.     AddUnitClass(ALL, "jed_knight_01",1, 2)
  183.     AddUnitClass(ALL, "jed_knight_03",1, 4)
  184.     AddUnitClass(ALL, "jed_knight_04",1, 2)
  185.     SetHeroClass(ALL, "all_hero_luke_jedi")    
  186.     SetHeroClass(IMP, "imp_hero_emperor")
  187.    
  188.  
  189.     -- SetTeamAsEnemy(DEF, 3)
  190.  
  191.     --  Level Stats
  192.     ClearWalkers()
  193.     AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
  194.     AddWalkerType(1, 0) --
  195.     AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
  196.     AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
  197.     local guyCnt = 50
  198.     local weaponCnt = 200
  199.     SetMemoryPoolSize("Aimer", 20)
  200.     SetMemoryPoolSize("AmmoCounter", weaponCnt)
  201.     SetMemoryPoolSize("EnergyBar", weaponCnt)
  202.     SetMemoryPoolSize("EntityCloth", 21)
  203.     SetMemoryPoolSize("EntityLight", 96)
  204.     SetMemoryPoolSize("MountedTurret", 13)
  205.     SetMemoryPoolSize("PathFollower", guyCnt)
  206.     SetMemoryPoolSize("Navigator", guyCnt)
  207.     SetMemoryPoolSize("SoundSpaceRegion", 38)
  208.     SetMemoryPoolSize("TreeGridStack", 256)
  209.     SetMemoryPoolSize("UnitAgent", guyCnt)
  210.     SetMemoryPoolSize("UnitController", guyCnt)
  211.     SetMemoryPoolSize("Weapon", weaponCnt)
  212.     SetMemoryPoolSize("EntityFlyer", 4)  
  213.  
  214.     SetSpawnDelay(10.0, 0.25)
  215.     ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
  216.     SetDenseEnvironment("True")
  217.       -- SetMaxFlyHeight(25)
  218.      --SetMaxPlayerFlyHeight (25)
  219.  AddDeathRegion("DeathRegion1")
  220.  
  221.  
  222.  
  223.     --  Movies
  224.     --  SetVictoryMovie(ALL, "all_end_victory")
  225.     --  SetDefeatMovie(ALL, "imp_end_victory")
  226.     --  SetVictoryMovie(IMP, "imp_end_victory")
  227.     --  SetDefeatMovie(IMP, "all_end_victory")
  228.  
  229.     --  Sound
  230.    
  231.     voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
  232.     AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
  233.     AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
  234.    
  235.     voiceQuick = OpenAudioStream("sound\\global.lvl",  "all_unit_vo_quick")
  236.     AudioStreamAppendSegments("sound\\global.lvl",  "imp_unit_vo_quick", voiceQuick)
  237.    
  238.     OpenAudioStream("sound\\global.lvl",  "gcw_music")
  239.     -- OpenAudioStream("sound\\global.lvl",  "global_vo_quick")
  240.     -- OpenAudioStream("sound\\global.lvl",  "global_vo_slow")
  241.     OpenAudioStream("sound\\cor.lvl",  "cor1")
  242.     OpenAudioStream("sound\\cor.lvl",  "cor1")
  243.     -- OpenAudioStream("sound\\cor.lvl",  "cor1_emt")
  244.  
  245.     SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
  246.     SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing",   1)
  247.     SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing",   1)
  248.     SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)
  249.  
  250.     SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
  251.     SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
  252.     SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
  253.     SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)
  254.  
  255.     SetOutOfBoundsVoiceOver(1, "allleaving")
  256.     SetOutOfBoundsVoiceOver(2, "impleaving")
  257.  
  258.     SetAmbientMusic(ALL, 1.0, "all_cor_amb_start",  0,1)
  259.     SetAmbientMusic(ALL, 0.8, "all_cor_amb_middle", 1,1)
  260.     SetAmbientMusic(ALL, 0.2, "all_cor_amb_end",    2,1)
  261.     SetAmbientMusic(IMP, 1.0, "imp_cor_amb_start",  0,1)
  262.     SetAmbientMusic(IMP, 0.8, "imp_cor_amb_middle", 1,1)
  263.     SetAmbientMusic(IMP, 0.2, "imp_cor_amb_end",    2,1)
  264.  
  265.     SetVictoryMusic(ALL, "all_cor_amb_victory")
  266.     SetDefeatMusic (ALL, "all_cor_amb_defeat")
  267.     SetVictoryMusic(IMP, "imp_cor_amb_victory")
  268.     SetDefeatMusic (IMP, "imp_cor_amb_defeat")
  269.  
  270.     SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin")
  271.     SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
  272.     --  SetSoundEffect("BirdScatter",         "birdsFlySeq1")
  273.     SetSoundEffect("SpawnDisplayUnitChange",       "shell_select_unit")
  274.     SetSoundEffect("SpawnDisplayUnitAccept",       "shell_menu_enter")
  275.     SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
  276.     SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
  277.     SetSoundEffect("SpawnDisplayBack",             "shell_menu_exit")
  278.  
  279.  
  280.     SetAttackingTeam(ATT)
  281.  
  282.  
  283.  
  284.     AddCameraShot(0.419938, 0.002235, -0.907537, 0.004830, -15.639358, 5.499980, -176.911179);
  285.     AddCameraShot(0.994506, 0.104463, -0.006739, 0.000708, 1.745251, 5.499980, -118.700668);
  286.     AddCameraShot(0.008929, -0.001103, -0.992423, -0.122538, 1.366768, 16.818106, -114.422173);
  287.     AddCameraShot(0.761751, -0.117873, -0.629565, -0.097419, 59.861904, 16.818106, -81.607773);
  288.     AddCameraShot(0.717110, -0.013583, 0.696703, 0.013197, 98.053314, 11.354497, -85.857857);
  289.     AddCameraShot(0.360958, -0.001053, -0.932577, -0.002721, 69.017578, 18.145807, -56.992413);
  290.     AddCameraShot(-0.385976, 0.014031, -0.921793, -0.033508, 93.111061, 18.145807, -20.164375);
  291.     AddCameraShot(0.695468, -0.129569, -0.694823, -0.129448, 27.284357, 18.145807, -12.377695);
  292.     AddCameraShot(0.009002, -0.000795, -0.996084, -0.087945, 1.931320, 13.356332, -16.410583);
  293.     AddCameraShot(0.947720, -0.145318, 0.280814, 0.043058, 11.650738, 16.955814, 28.359180);
  294.     AddCameraShot(0.686380, -0.127550, 0.703919, 0.130810, -30.096384, 11.152356, -63.235146);
  295.     AddCameraShot(0.937945, -0.108408, 0.327224, 0.037821, -43.701199, 8.756138, -49.974789);
  296.     AddCameraShot(0.531236, -0.079466, -0.834207, -0.124787, -62.491230, 10.305247, -120.102989);
  297.     AddCameraShot(0.452286, -0.179031, -0.812390, -0.321572, -50.015198, 15.394646, -114.879379);
  298.     AddCameraShot(0.927563, -0.243751, 0.273918, 0.071982, 26.149965, 26.947924, -46.834148);
  299. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement