TechOFreak

Episode 42 Functions

May 14th, 2021 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.38 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 42 Animations Pt.3! Scripting Cutscenes!
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. //No new functions, below is only the code we wrote this episode
  7.  
  8. Seq_DoorBreak("");
  9.  
  10. cSequenceStatesData mSeq_DoorBreak;
  11.    
  12. void Seq_DoorBreak(const tString &in asTimer){
  13.     Sequence_Begin("Seq_DoorBreak", mSeq_DoorBreak);
  14.        
  15.     if(Sequence_DoStepAndWait(3.6f)){
  16.         Entity_SetActive("ghoul_storage", true);
  17.         Prop_SetHealth("door_1", 0.0f);
  18.         Ghoul_SetAllowPlayerThrow("ghoul_storage", false);
  19.         Ghoul_SetCanAttack("ghoul_storage", false);
  20.         PlayerBody_PlayCutsceneAtEntity("spooked_fall_back_permafail_ghoul_encounter", "PosArea_DoorScare", false, 0.3f, "OnEndOfAnim_DoorScare", 1.0f, 0.f, 0.0f, 30.0f, true, false, false);
  21.     }
  22.     if(Sequence_DoStepAndWait(.4f)){
  23.         cVector3f cameraPos = Player_GetCameraPosition();
  24.         Effect_Fade_Out(.05);
  25.         PlayerBody_PlayCutsceneAnimation("fall_and_get_up_quickly", false, .3f, "", 1.0f, 0.3f, true, cVector3f(cameraPos.x, 0.1f, cameraPos.z), cLux_GetPlayer().GetCharacterBody().GetYaw()+40.0f);
  26.     }
  27.     if(Sequence_DoStepAndWait(3.0f)){
  28.         Effect_Fade_In(.15);
  29.         Agent_SetSensesActive("ghoul_storage", false);
  30.     }
  31.        
  32.     Sequence_End();
  33. }
Add Comment
Please, Sign In to add comment