Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From my Amnesia Rebirth Tutorial Series
- //Episode 43 Camera Animations/Cutscenes
- //https://www.youtube.com/playlist?list=PL4KkjlmOwLwwMVqedCNpi6caUxhgyf8Qr
- //-----------------------------------------------------------
- //Enable or disable the visibility of the players crosshair
- Player_ShowCrossHairIcons(false);
- //enabled (bool)- should it be enabled or not.
- //Play a series of camera animation nodes in your level
- CameraAnimation_Begin("IntroAnimation", "OnCameraInteration_IntroAnimation", true);
- //nodePrefix (String)- the first part your nodes names. (Ex. Use "IntroAnimation" when your nodes are called "IntroAnimation_1", "IntroAnimation_2", etc.)
- //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)
- //autoEnd (bool)- should the camera animation automatically end when reaching the last camera node (true or false).
- //End a playing camera animation
- CameraAnimation_End();
- //Attach an entity to the camera
- CameraAnimation_SetAttachedEntity("plank", false, false, false);
- //entityName (String)- the name of the entity.
- //alignYaw (bool)- should the entity be aligned with the camera's yaw (true or false).
- //alignPitch (bool)- should the entity be aligned with the camera's pitch (true or false).
- //alignRoll (bool)- should the entity be aligned with the camera's roll (true or false).
- //Detach entity's from the camera
- CameraAnimation_RemoveAttachedEntity();
- ///////////////////////////////////////////////////
- // Code we wrote in today's episode
- //////////////////////////////////////////////////
- Player_ShowCrossHairIcons(false);
- CameraAnimation_Begin("IntroAnimation", "OnCameraInteration_IntroAnimation", true);
- CameraAnimation_SetAttachedEntity("plank", false, false, false);
- void OnCameraInteration_IntroAnimation(const tString &in asEntity){
- cLux_AddDebugMessage("Player interated with " + asEntity);
- }
- bool OnPassedCameraNode_IntroAnimation2(const tString &in asEntity, int alDirection)
- {
- cLux_AddDebugMessage(asEntity + " node passed");
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement