Advertisement
TechOFreak

Episode 43 Functions

May 21st, 2021
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.14 KB | None | 0 0
  1. //From my Amnesia Rebirth Tutorial Series
  2. //Episode 43 Camera Animations/Cutscenes
  3. //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
  4. //-----------------------------------------------------------
  5.  
  6. //Enable or disable the visibility of the players crosshair
  7. Player_ShowCrossHairIcons(false);
  8. //enabled (bool)- should it be enabled or not.
  9.  
  10. //Play a series of camera animation nodes in your level
  11. CameraAnimation_Begin("IntroAnimation", "OnCameraInteration_IntroAnimation", true);
  12. //nodePrefix (String)- the first part your nodes names. (Ex. Use "IntroAnimation" when your nodes are called "IntroAnimation_1", "IntroAnimation_2", etc.)
  13. //cameraInteractionCallback (String)- the name of the function to call when the player interacts with something during the camera animation. syntax: void func(const tString &in asEntity)
  14. //autoEnd (bool)- should the camera animation automatically end when reaching the last camera node (true or false).
  15.  
  16. //End a playing camera animation
  17. CameraAnimation_End();
  18.  
  19. //Attach an entity to the camera
  20. CameraAnimation_SetAttachedEntity("plank", false, false, false);
  21. //entityName (String)- the name of the entity.
  22. //alignYaw (bool)- should the entity be aligned with the camera's yaw (true or false).
  23. //alignPitch (bool)- should the entity be aligned with the camera's pitch (true or false).
  24. //alignRoll (bool)- should the entity be aligned with the camera's roll (true or false).
  25.  
  26. //Detach entity's from the camera
  27. CameraAnimation_RemoveAttachedEntity();
  28.  
  29. ///////////////////////////////////////////////////
  30. // Code we wrote in today's episode
  31. //////////////////////////////////////////////////
  32.  
  33. Player_ShowCrossHairIcons(false);
  34. CameraAnimation_Begin("IntroAnimation", "OnCameraInteration_IntroAnimation", true);
  35. CameraAnimation_SetAttachedEntity("plank", false, false, false);
  36.  
  37. void OnCameraInteration_IntroAnimation(const tString &in asEntity){
  38.         cLux_AddDebugMessage("Player interated with " + asEntity);
  39.     }
  40.  
  41. bool OnPassedCameraNode_IntroAnimation2(const tString &in asEntity, int alDirection)
  42.     {
  43.         cLux_AddDebugMessage(asEntity + " node passed");
  44.         return false;
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement