Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.58 KB | None | 0 0
  1. --
  2. -- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
  3. --
  4.  
  5. -- load the gametype script
  6. Conquest = ScriptCB_DoFile("ObjectiveConquest")
  7. ScriptCB_DoFile("setup_teams")
  8.  
  9. --  These variables do not change
  10. ATT = 1
  11. DEF = 2
  12.  
  13. --  Empire Attacking (attacker is always #1)
  14. CIS = ATT
  15. REP = DEF
  16.  
  17.  ---------------------------------------------------------------------------
  18.  -- FUNCTION:    ScriptInit
  19.  -- PURPOSE:     This function is only run once
  20.  -- INPUT:
  21.  -- OUTPUT:
  22.  -- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
  23.  --              mission script must contain a version of this function, as
  24.  --              it is called from C to start the mission.
  25.  ---------------------------------------------------------------------------
  26.  
  27. function ScriptPostLoad()
  28.  
  29.         AddDeathRegion("death")
  30.         AddDeathRegion("death1")
  31.         AddDeathRegion("death2")
  32.         AddDeathRegion("death3")
  33.         AddDeathRegion("death4")
  34.  
  35.  
  36.  
  37.  
  38.         SetProperty ("LibCase1","MaxHealth",1000)
  39.         SetProperty ("LibCase2","MaxHealth",1000)
  40.         SetProperty ("LibCase3","MaxHealth",1000)
  41.         SetProperty ("LibCase4","MaxHealth",1000)
  42.         SetProperty ("LibCase5","MaxHealth",1000)
  43.         SetProperty ("LibCase6","MaxHealth",1000)
  44.         SetProperty ("LibCase7","MaxHealth",1000)
  45.         SetProperty ("LibCase8","MaxHealth",1000)
  46.         SetProperty ("LibCase9","MaxHealth",1000)
  47.         SetProperty ("LibCase10","MaxHealth",1000)
  48.         SetProperty ("LibCase11","MaxHealth",1000)
  49.         SetProperty ("LibCase12","MaxHealth",1000)
  50.         SetProperty ("LibCase13","MaxHealth",1000)
  51.         SetProperty ("LibCase14","MaxHealth",1000)
  52.  
  53.  
  54.         SetProperty ("LibCase1","CurHealth",1000)
  55.         SetProperty ("LibCase2","CurHealth",1000)
  56.         SetProperty ("LibCase3","CurHealth",1000)
  57.         SetProperty ("LibCase4","CurHealth",1000)
  58.         SetProperty ("LibCase5","CurHealth",1000)
  59.         SetProperty ("LibCase6","CurHealth",1000)
  60.         SetProperty ("LibCase7","CurHealth",1000)
  61.         SetProperty ("LibCase8","CurHealth",1000)
  62.         SetProperty ("LibCase9","CurHealth",1000)
  63.         SetProperty ("LibCase10","CurHealth",1000)
  64.         SetProperty ("LibCase11","CurHealth",1000)
  65.         SetProperty ("LibCase12","CurHealth",1000)
  66.         SetProperty ("LibCase13","CurHealth",1000)
  67.         SetProperty ("LibCase14","CurHealth",1000)
  68.  
  69.  
  70.  
  71.         EnableSPHeroRules()
  72.        
  73.         DisableBarriers("SideDoor1")
  74.         DisableBarriers("MainLibraryDoors")
  75.         DisableBarriers("SideDoor2")
  76.         DisableBarriers("SIdeDoor3")
  77.         DisableBarriers("ComputerRoomDoor1")
  78.         DisableBarriers("StarChamberDoor1")
  79.         DisableBarriers("StarChamberDoor2")
  80.         DisableBarriers("WarRoomDoor1")
  81.         DisableBarriers("WarRoomDoor2")
  82.         DisableBarriers("WarRoomDoor3")
  83.         PlayAnimation("DoorOpen01")
  84.         PlayAnimation("DoorOpen02")
  85.            
  86.            
  87.                     --This defines the CPs.  These need to happen first
  88.     cp1 = CommandPost:New{name = "cp1"}
  89.     cp2 = CommandPost:New{name = "cp2"}
  90.     cp3 = CommandPost:New{name = "cp3"}
  91.     cp4 = CommandPost:New{name = "cp4"}
  92.     cp5 = CommandPost:New{name = "cp5"}
  93.     cp6 = CommandPost:New{name = "cp6"}
  94.    
  95.     --This sets up the actual objective.  This needs to happen after cp's are defined
  96.     conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
  97.                                      textATT = "game.modes.con",
  98.                                      textDEF = "game.modes.con2",
  99.                                      multiplayerRules = true}
  100.    
  101.     --This adds the CPs to the objective.  This needs to happen after the objective is set up
  102.     conquest:AddCommandPost(cp1)
  103.     conquest:AddCommandPost(cp2)
  104.     conquest:AddCommandPost(cp3)
  105.     conquest:AddCommandPost(cp4)
  106.     conquest:AddCommandPost(cp5)
  107.     conquest:AddCommandPost(cp6)
  108.    
  109.     conquest:Start()
  110.            
  111.  end
  112.  
  113. function ScriptInit()
  114.     -- Designers, these two lines *MUST* be first.
  115.    
  116.     SetPS2ModelMemory(4056000)
  117.    
  118.     SetMapNorthAngle(180, 1)
  119.     SetMaxFlyHeight(25)
  120.     SetMaxPlayerFlyHeight (25)
  121.     AISnipeSuitabilityDist(30)
  122.    
  123.    
  124.    
  125.     SetMemoryPoolSize("Music", 33)
  126.  
  127.     ReadDataFile("ingame.lvl")
  128.    
  129.          
  130.     ReadDataFile("sound\\cor.lvl;cor1cw")
  131.  
  132.     ReadDataFile("SIDE\\rep.lvl",
  133.                 "rep_inf_ep3_rifleman",
  134.                 "rep_fly_assault_DOME",
  135.                 "rep_fly_gunship_DOME",
  136.                 "rep_inf_ep3_rocketeer",
  137.                 "rep_inf_ep3_engineer",
  138.                 "rep_inf_ep3_sniper",
  139.                 "rep_inf_ep3_officer",
  140.                 "rep_inf_ep3_jettrooper",
  141.                 "rep_hero_macewindu")
  142.                
  143.     ReadDataFile("SIDE\\cis.lvl",
  144.                 "cis_inf_rifleman",
  145.         "cis_fly_droidfighter_DOME",
  146.         "cis_inf_rocketeer",
  147.                 "cis_inf_engineer",
  148.                 "cis_inf_officer",
  149.                 "cis_inf_sniper",
  150.                 "cis_inf_droideka",
  151.                 "cis_hero_darthmaul")
  152.                
  153.     ReadDataFile("SIDE\\tur.lvl",
  154.                 "tur_bldg_laser")
  155.  
  156.     ReadDataFile("SIDE\\jed.lvl",
  157.         "jed_knight_01",
  158.         "jed_knight_02",
  159.         "jed_knight_03",
  160.         "jed_knight_04")          
  161.                
  162.    
  163.     SetupTeams{
  164.              
  165.         rep = {
  166.             team = REP,
  167.             units = 32,
  168.             reinforcements = 150,
  169.             soldier  = { "rep_inf_ep3_rifleman",7, 25},
  170.             assault  = { "rep_inf_ep3_rocketeer",1, 4},
  171.             engineer = { "rep_inf_ep3_engineer",1, 4},
  172.             sniper   = { "rep_inf_ep3_sniper",1, 4},
  173.             officer = {"rep_inf_ep3_officer",1, 4},
  174.             special = { "rep_inf_ep3_jettrooper",1, 4},
  175.            
  176.         },
  177.         cis = {
  178.             team = CIS,
  179.             units = 32,
  180.             reinforcements = 150,
  181.             soldier  = { "cis_inf_rifleman",7, 25},
  182.             assault  = { "cis_inf_rocketeer",1, 4},
  183.             engineer = { "cis_inf_engineer",1, 4},
  184.             sniper   = { "cis_inf_sniper",1, 4},
  185.             officer = {"cis_inf_officer",1, 4},
  186.             special = { "cis_inf_droideka",1, 4},
  187.         }
  188.      }
  189.     AddUnitClass(REP, "jed_knight_02",0, 1)
  190.     AddUnitClass(REP, "jed_knight_03",0, 1)
  191.     AddUnitClass(REP, "jed_knight_04",0, 1)
  192.     SetHeroClass(CIS, "cis_hero_darthmaul")
  193.     SetHeroClass(REP, "rep_hero_macewindu")
  194.  
  195.      
  196.    
  197. --  Level Stats
  198.     ClearWalkers()
  199.     AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
  200.     AddWalkerType(1, 0) --
  201.     AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
  202.     AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
  203.     local weaponCnt = 210
  204.     SetMemoryPoolSize("Aimer", 22)
  205.     SetMemoryPoolSize("AmmoCounter", weaponCnt)
  206.     SetMemoryPoolSize("BaseHint", 250)
  207.     SetMemoryPoolSize("EnergyBar", weaponCnt)
  208.     SetMemoryPoolSize("EntityCloth", 18)
  209.     SetMemoryPoolSize("EntitySoundStream", 10)
  210.     SetMemoryPoolSize("EntitySoundStatic", 0)
  211.     SetMemoryPoolSize("MountedTurret",12)
  212.     SetMemoryPoolSize("PathFollower", 50)
  213.     SetMemoryPoolSize("Navigator", 50)
  214.     SetMemoryPoolSize("Obstacle", 375)
  215.     SetMemoryPoolSize("SoundSpaceRegion", 38)
  216.     SetMemoryPoolSize("TentacleSimulator", 0)
  217.     SetMemoryPoolSize("TreeGridStack", 140)
  218.     SetMemoryPoolSize("UnitAgent", 50)
  219.     SetMemoryPoolSize("UnitController", 50)
  220.     SetMemoryPoolSize("Weapon", weaponCnt)
  221.     SetMemoryPoolSize("EntityFlyer", 4)  
  222.  
  223.     SetSpawnDelay(10.0, 0.25)
  224.    ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
  225.     SetDenseEnvironment("True")
  226.          -- SetMaxFlyHeight(25)
  227.      --SetMaxPlayerFlyHeight (25)
  228.  AddDeathRegion("DeathRegion1")
  229.  
  230.     --  Sound Stats
  231.    
  232.     voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
  233.     AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
  234.     AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
  235.    
  236.     voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
  237.     AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
  238.    
  239.     OpenAudioStream("sound\\global.lvl",  "cw_music")
  240.     -- OpenAudioStream("sound\\global.lvl",  "global_vo_quick")
  241.     -- OpenAudioStream("sound\\global.lvl",  "global_vo_slow")
  242.     OpenAudioStream("sound\\cor.lvl",  "cor1")
  243.     OpenAudioStream("sound\\cor.lvl",  "cor1")
  244.     -- OpenAudioStream("sound\\cor.lvl",  "cor1_emt")
  245.  
  246.     SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
  247.     SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1)
  248.     SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1)
  249.     SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
  250.    
  251.     SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
  252.     SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
  253.     SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
  254.     SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)    
  255.  
  256.     SetOutOfBoundsVoiceOver(2, "Repleaving")
  257.     SetOutOfBoundsVoiceOver(1, "Cisleaving")
  258.  
  259.     SetAmbientMusic(REP, 1.0, "rep_cor_amb_start",  0,1)
  260.     SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
  261.     SetAmbientMusic(REP, 0.2, "rep_cor_amb_end",    2,1)
  262.     SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start",  0,1)
  263.     SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
  264.     SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end",    2,1)
  265.  
  266.     SetVictoryMusic(REP, "rep_cor_amb_victory")
  267.     SetDefeatMusic (REP, "rep_cor_amb_defeat")
  268.     SetVictoryMusic(CIS, "cis_cor_amb_victory")
  269.     SetDefeatMusic (CIS, "cis_cor_amb_defeat")
  270.  
  271.     SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin")
  272.     SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
  273.     --SetSoundEffect("WeaponUnableSelect",  "com_weap_inf_weaponchange_null")
  274.     --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null")
  275.     SetSoundEffect("SpawnDisplayUnitChange",       "shell_select_unit")
  276.     SetSoundEffect("SpawnDisplayUnitAccept",       "shell_menu_enter")
  277.     SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
  278.     SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
  279.     SetSoundEffect("SpawnDisplayBack",             "shell_menu_exit")
  280.  
  281.  
  282.     --  Camera Stats
  283.     --Tat 1 - Dune Sea
  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.  
  300. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement