Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.49 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. -- REP Attacking (attacker is always #1)
  10. REP = 1;
  11. CIS = 2;
  12. -- These variables do not change
  13. ATT = REP;
  14. DEF = CIS;
  15.  
  16.  
  17. function ScriptPostLoad()
  18.  
  19. OnObjectRespawnName(PlayAnimOpenDoor, "hangar_door_panel");
  20.  
  21. --This defines the CPs. These need to happen first
  22. cp1 = CommandPost:New{name = "cp1"}
  23. cp2 = CommandPost:New{name = "cp2"}
  24. cp3 = CommandPost:New{name = "cp3"}
  25. cp4 = CommandPost:New{name = "cp4"}
  26.  
  27.  
  28.  
  29. --This sets up the actual objective. This needs to happen after cp's are defined
  30. conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
  31. textATT = "game.modes.con",
  32. textDEF = "game.modes.con2",
  33. multiplayerRules = true}
  34.  
  35. --This adds the CPs to the objective. This needs to happen after the objective is set up
  36. conquest:AddCommandPost(cp1)
  37. conquest:AddCommandPost(cp2)
  38. conquest:AddCommandPost(cp3)
  39. conquest:AddCommandPost(cp4)
  40.  
  41. conquest:Start()
  42.  
  43. EnableSPHeroRules()
  44. -- OPEN
  45. function PlayAnimOpenDoor()
  46. PauseAnimation("doorClose");
  47. RewindAnimation("doorOpen");
  48. PlayAnimation("doorOpen");
  49.  
  50. end
  51. -- CLOSE
  52. function PlayAnimCloseDoor()
  53. PauseAnimation("doorOpen");
  54. RewindAnimation("doorClose");
  55. PlayAnimation("doorClose");
  56.  
  57. end
  58.  
  59.  
  60. end
  61.  
  62.  
  63. ---------------------------------------------------------------------------
  64. -- FUNCTION: ScriptInit
  65. -- PURPOSE: This function is only run once
  66. -- INPUT:
  67. -- OUTPUT:
  68. -- NOTES: The name, 'ScriptInit' is a chosen convention, and each
  69. -- mission script must contain a version of this function, as
  70. -- it is called from C to start the mission.
  71. ---------------------------------------------------------------------------
  72. function ScriptInit()
  73.  
  74. ReadDataFile("ingame.lvl")
  75.  
  76.  
  77. SetMaxFlyHeight(30)
  78. SetMaxPlayerFlyHeight (30)
  79.  
  80. SetMemoryPoolSize ("ClothData",20)
  81. SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
  82. SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
  83. SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
  84. SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
  85. SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
  86. SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
  87. SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo
  88.  
  89. ReadDataFile("sound\\yav.lvl;yav1cw")
  90. ReadDataFile("SIDE\\rep.lvl",
  91. "rep_inf_ep3_rifleman",
  92. "rep_inf_ep3_rocketeer",
  93. "rep_inf_ep3_engineer",
  94. "rep_inf_ep3_sniper",
  95. "rep_inf_ep3_officer",
  96. "rep_inf_ep3_jettrooper",
  97. "rep_hover_fightertank",
  98. "rep_hero_anakin",
  99. "rep_hover_barcspeeder")
  100. ReadDataFile("SIDE\\cis.lvl",
  101. "cis_inf_rifleman",
  102. "cis_inf_rocketeer",
  103. "cis_inf_engineer",
  104. "cis_inf_sniper",
  105. "cis_inf_officer",
  106. "cis_inf_droideka",
  107. "cis_hero_darthmaul",
  108. "cis_hover_aat")
  109.  
  110.  
  111. ReadDataFile("SIDE\\tur.lvl",
  112. "tur_bldg_laser",
  113. "tur_bldg_tower")
  114.  
  115. SetupTeams{
  116. rep = {
  117. team = REP,
  118. units = 20,
  119. reinforcements = 150,
  120. soldier = { "rep_inf_ep3_rifleman",9, 25},
  121. assault = { "rep_inf_ep3_rocketeer",1, 4},
  122. engineer = { "rep_inf_ep3_engineer",1, 4},
  123. sniper = { "rep_inf_ep3_sniper",1, 4},
  124. officer = {"rep_inf_ep3_officer",1, 4},
  125. special = { "rep_inf_ep3_jettrooper",1, 4},
  126.  
  127. },
  128. cis = {
  129. team = CIS,
  130. units = 20,
  131. reinforcements = 150,
  132. soldier = { "cis_inf_rifleman",9, 25},
  133. assault = { "cis_inf_rocketeer",1, 4},
  134. engineer = { "cis_inf_engineer",1, 4},
  135. sniper = { "cis_inf_sniper",1, 4},
  136. officer = {"cis_inf_officer",1, 4},
  137. special = { "cis_inf_droideka",1, 4},
  138. }
  139. }
  140.  
  141. SetHeroClass(CIS, "cis_hero_darthmaul")
  142. SetHeroClass(REP, "rep_hero_anakin")
  143.  
  144.  
  145. -- Level Stats
  146. -- ClearWalkers()
  147. AddWalkerType(0, 4) -- special -> droidekas
  148. AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
  149. AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
  150. AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
  151. local weaponCnt = 1024
  152. SetMemoryPoolSize("Aimer", 75)
  153. SetMemoryPoolSize("AmmoCounter", weaponCnt)
  154. SetMemoryPoolSize("BaseHint", 1024)
  155. SetMemoryPoolSize("EnergyBar", weaponCnt)
  156. SetMemoryPoolSize("EntityCloth", 32)
  157. SetMemoryPoolSize("EntityFlyer", 32)
  158. SetMemoryPoolSize("EntityHover", 32)
  159. SetMemoryPoolSize("EntityLight", 200)
  160. SetMemoryPoolSize("EntitySoundStream", 4)
  161. SetMemoryPoolSize("EntitySoundStatic", 32)
  162. SetMemoryPoolSize("MountedTurret", 32)
  163. SetMemoryPoolSize("Navigator", 128)
  164. SetMemoryPoolSize("Obstacle", 1024)
  165. SetMemoryPoolSize("PathNode", 1024)
  166. SetMemoryPoolSize("SoundSpaceRegion", 64)
  167. SetMemoryPoolSize("TreeGridStack", 1024)
  168. SetMemoryPoolSize("UnitAgent", 128)
  169. SetMemoryPoolSize("UnitController", 128)
  170. SetMemoryPoolSize("Weapon", weaponCnt)
  171.  
  172. SetSpawnDelay(10.0, 0.25)
  173. --ReadDataFile("dc:TST\\TST.lvl", "TST_conquest")
  174. ReadDataFile("dc:TST\\TST.lvl", "TST_conquest")
  175. SetDenseEnvironment("false")
  176.  
  177.  
  178.  
  179.  
  180. -- Sound
  181.  
  182. SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
  183. SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
  184.  
  185. voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
  186. AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
  187. AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
  188.  
  189. voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
  190. AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
  191.  
  192. OpenAudioStream("sound\\global.lvl", "cw_music")
  193. -- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
  194. -- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
  195. OpenAudioStream("sound\\yav.lvl", "yav1")
  196. OpenAudioStream("sound\\yav.lvl", "yav1")
  197. OpenAudioStream("sound\\yav.lvl", "yav1_emt")
  198.  
  199. SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
  200. SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
  201. SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
  202. SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
  203.  
  204. SetOutOfBoundsVoiceOver(2, "cisleaving")
  205. SetOutOfBoundsVoiceOver(1, "repleaving")
  206.  
  207. SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
  208. SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
  209. SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
  210. SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
  211. SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
  212. SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)
  213.  
  214. SetVictoryMusic(REP, "rep_yav_amb_victory")
  215. SetDefeatMusic (REP, "rep_yav_amb_defeat")
  216. SetVictoryMusic(CIS, "cis_yav_amb_victory")
  217. SetDefeatMusic (CIS, "cis_yav_amb_defeat")
  218.  
  219. SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
  220. SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
  221. --SetSoundEffect("BirdScatter", "birdsFlySeq1")
  222. --SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
  223. --SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
  224. SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
  225. SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
  226. SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
  227. SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
  228. SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
  229.  
  230.  
  231. --OpeningSateliteShot
  232. AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);
  233.  
  234. AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
  235. AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
  236. AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
  237. AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
  238. AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
  239. AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
  240. AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
  241. AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
  242. AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
  243. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement