Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. kmyquest.MQ101EnableLayer = InputEnableLayer.Create()
  2. kmyquest.MQ101EnableLayer.DisablePlayerControls(abLooking=True, abCamSwitch=True, abSneaking = True)
  3. kmyquest.MQ101EnableLayer.EnableSprinting(False)
  4.  
  5. ;disable Z-Key
  6. kmyquest.MQ101EnableLayer.EnableZKey(False)
  7.  
  8. ;Store actors for optimization
  9. Actor PlayerREF = Game.GetPlayer()
  10. Actor SpouseMaleREF = Alias_SpouseMale.GetActorRef()
  11. Actor SpouseFemaleREF = Alias_SpouseFemale.GetActorRef()
  12.  
  13. ;set charGen skeletons
  14. PlayerREF.SetHasCharGenSkeleton()
  15. SpouseFemaleREF.SetHasCharGenSkeleton()
  16.  
  17. ;precache the face gen data
  18. Game.PrecacheCharGen()
  19.  
  20. ; move the player so that New Game button puts him in the right place
  21. PlayerREF.MoveTo(TestStartMarker)
  22.  
  23. ; setup spouse
  24. ;SpouseMaleREF.Disable()
  25. Alias_ActiveSpouse.ForceRefTo(SpouseFemaleREF)
  26.  
  27. ; Force a short wait so the fade out request isn't made while the loading menu is up
  28. ; (which would cause it to be bashed when the loading menu goes away and tells the
  29. ; fade menu to fade in)
  30. ;debug.trace(self + "Wait 0.1 seconds")
  31. Utility.Wait(0.1)
  32. ;debug.trace(self + "Finish waiting. Fade the game in.")
  33.  
  34.  
  35. ; play the opening BINK
  36. Game.PlayBink( "IntroDummy.bk2", abInterruptible=true, abIsNewGameBink=false )
  37. ;Play our dummy bik file.Passing abIsNewGameBink as false so we get a black screen.
  38.  
  39. ;black screen for presentation i guess
  40. FOC_GameInitImod.Apply()
  41.  
  42. ;have to do this after starting a new game. otherwise the fade menu overlaps the dialog box.
  43. Game.FadeOutGame(False, False, 0.1, 0.01)
  44.  
  45. ;Ask player which game they want to load into at the start.
  46. int ibutton = FOC_GameInit.Show()
  47. If (ibutton == 0)
  48.  
  49. Game.PrecacheCharGenClear()
  50.  
  51. kmyquest.MQ101EnableLayer.Delete()
  52.  
  53. ; move the player so that New Game button puts him in the right place
  54. Game.GetPlayer().MoveTo(TestStartMarker)
  55.  
  56. ;precache the face gen data
  57. ;Game.PrecacheCharGen()
  58.  
  59. ;play my bink!
  60. Game.PlayBink( "Intro_Cascadia.bk2", abInterruptible=true, abIsNewGameBink=true )
  61.  
  62. ;remove all player gear
  63. PlayerREF.RemoveAllItems()
  64.  
  65. ;default clothes for intro in retail
  66. PlayerREF.AddItem(ClothesMaCready, absilent=True)
  67. PlayerREF.EquipItem(ClothesMaCready, absilent=True)
  68.  
  69. ;Get camera set up for hero gen.
  70. ;Game.ForceThirdPerson()
  71. ;Utility.Wait(1)
  72. ;Game.GetPlayer().PlayIdle(ElevatorFaceCamera)
  73.  
  74. ;removing black imagespace mod
  75. FOC_GameInitImod.Remove()
  76.  
  77. ;waiting
  78. Utility.Wait(0.1)
  79.  
  80. ;Fade in.
  81. Game.FadeOutGame(False, False, 3.0, 2.0)
  82.  
  83. ;call our main quest to start and stop this one.
  84. CAS_FOCMQ101.Start()
  85. Stop()
  86.  
  87. ;start retail game.
  88. ElseIf (ibutton == 1)
  89.  
  90. PlayerREF.MoveTo(pMQ101PlayerStartMarker01)
  91. ;play retail video
  92. Game.PlayBink( "Intro.bk2", abInterruptible=true, abIsNewGameBink=true )
  93.  
  94. ;Remove black imagespacemod
  95. FOC_GameInitImod.Remove()
  96.  
  97. ; remove all the player's stuff
  98. PlayerREF.RemoveAllItems()
  99.  
  100. ; give the player the right starting gear
  101. PlayerREF.AddItem(CharGenPlayerClothes, absilent=True)
  102. PlayerREF.EquipItem(CharGenPlayerClothes, absilent=True)
  103. PlayerREF.AddItem(pArmor_WeddingRing, absilent=true)
  104. PlayerREF.EquipItem(pArmor_WeddingRing, absilent=true)
  105.  
  106. ;put player in sink
  107. Alias_FaceGenSink.GetRef().Activate(PlayerREF, abDefaultProcessingOnly=True)
  108.  
  109. ;set weather - this must be done after the load
  110. ;PrewarPlayerHouseInteriorWeather.ForceActive(True)
  111.  
  112. ;turn off ambient particles
  113. Weather.EnableAmbientParticles(False)
  114.  
  115. ;disable SSR, Godrays, and Directional Lighting as they're not needed for FaceGen
  116. ;we need to call this function every second or else the failsafe will turn it off
  117. Game.ForceDisableSSRGodraysDirLight(True, True, True)
  118. kmyquest.StartTimer(1.0, 50)
  119.  
  120. ;FX
  121. CharGenCameraImod.Apply()
  122. CharGenSinkSoundFXEnableMarker.Enable()
  123.  
  124. ; give the load a second to get the player in the furniture
  125. Utility.Wait(1.0)
  126.  
  127. CharGenMirrorImod.Apply()
  128.  
  129. ;additional sound FX as we load in
  130. AMBIntChargenPlayerHouseBathroomSpotMirrorWipe.Play(PlayerREF)
  131.  
  132. ; fade the game in
  133. Game.FadeOutGame(False, False, 1.0, 2.0)
  134.  
  135. EndIf
  136. Utility.Wait(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement