Before we start moving towards creating activations for the last couple of cutscenes of the game, let’s get to work on creating our Game Manager so that we can use it to track certain objectives in the game, along with adding in more sounds. Once we have created the script for the GameManager, we can attach it to a new empty object within our hierarchy and open up our script:
Now we get to move towards working on the next obstacles in our game. Near the end, we have some security camera’s that we have to sneak by without being detected. As of now, they are just stationary, but let’s make a change to that. To start, let’s create an animation clip, just as we did with our cutscenes earlier, and create a 1 second movement for our camera:
From here, we can go into our animator and make a few adjustments:
With our guards being able to detect the player, let’s find a way to create a coin to toss into the scene to distract our guards for a brief moment so that we can make our way by them. To start, we need to make some additions to our player script so that we can have a method to trigger the use of the coin.
As we are going to bind it to our right click, we can just create a new group of code to work with. First, we will need a couple of variables to work with:
With our guards moving, we can now start to implement a system that will allow our guards to see the player passing by. This process will be pretty similar to how we allowed our ships fire at a powerup passing by here.
As a quick refresher though, let’s go over it quickly here. To start, we need to create a cube to act as the field of view for our guards:
From here, we will just expand our cube to create a good length for the range of view for our guards and delete the mesh filter so that we…
Now that we have our movement working along with the camera following around let’s switch over our capsule placeholder to our actual sprite and get the animation for him moving around working. To start, we are just going to drag in our sprite to be a child of our player capsule and turn off the mesh renderer for the capsule. From there, we want to increase the collider and nav mesh area to encompass our new player sprite:
Now that we have a working player that we can move around the scene, let’s get our game view to switch on us when we hit the triggers that are set up. To do this, we will need to create a new script for our triggers and attach it to each individual trigger. As well, we will want to make sure we add in a rigidbody so that detection can be made:
From here, we will go into our script and just start by making sure we have some sort of detection between the player and the triggers first so…
Now that we have our cutscenes in place, let’s start working on the playing aspect of our game. To start, we need a way to move our player around, and for this type of game we are going to be using a point and click style of movement.
First thing we will need to do is “bake” the floor so that we have a surface for our player and AI to walk on, and it prevents us from being able to click and move outside of the designated area. …
Now that we have done a few smaller cutscenes, let’s get to work on a bigger one. This one is close to a minute long and will cover the whole room we will be working in. As it comes with a voice over, we need to adjust our cuts to fit with both the voice, and the directors vision. First, let’s see what the director has in mind:
Next up in our cutscene adventure is creating a victory cutscene showing our player looking at the camera as he reaches for the door. First, let’s see what the directors vision is:
From here, we can use a couple variations as to how we want to set up our timeline. We can go with either 1 camera and just have it move into the close up position, or we can create 2 separate cameras and have them blend together.
First, let’s see how it look when we create just the 1 camera and adjust it’s position with an animation: