Cameras and the Sleeping Guard
This article is going to talk about setting up some triggers for the Security Cameras in the scene, as well as “triggering” the cutscenes along side that.
I have talked about Colliders before, and I’ll be talking about them again. So a collider is what it sounds like — you collide with it and something happens. A trigger is a type of collider, but rather than “colliding” as in a physical reaction, think of it as a switch. The player enters the “trigger” area, and a door opens, or a special effect happens, or a cutscene plays when you enter a boss room.
In this script here, I have a reference to the mesh renderer on the (child) object. Make a new red color, and set the Shader (material) color to that new red, indicating the player was caught. Then turn on the Cutscene while turning off the player so no duplicates in the scene at the time.
This process was similarly repeated for the Sleeping Guard. There is a trigger around the desk, once Darren walks into the trigger area, the sleeping guard cutscene plays.
That pretty much covers this update. The next article will be the final article talking about the Cinematography Course. Showing the final product. The Game Manager is the last thing needed now. On to the next!