Game Development Reference
In-Depth Information
Step 71: Double-check the AC_ToolFunctionalityScript that should be
attached to the Main Camera object that is a child of the FPC_AegisChung
prefab already within the Hierarchy. Make sure that all the elements
needed in this scene (Hallway Baked, Hallway Dark, etc.) are populated.
Leave things like Keypad Lock and Keypad Smoke unpopulated as they
are specific to the EntryWay.
Step 72: Make sure FPC_AegisChung is placed at the entrance.
Why?
When this level is loaded up, the assumption is that we've just walked in the
doors. So he needs to be just inside those doors he just entered through.
Step 73: Make sure AC_Flashlight, Flashlight, and AC_Pistol are all
activated for FPC_AegisChung in the Hierarchy.
Why?
Our InventoryButtonScript now goes out and finds these objects (if they
are inactive Unity can't find them) and then turns them off on start.
Step 74: Activate the unbaked version (the dark version) of the hallway
labeled Hallway_Unbaked if you're using downloaded prefabs, and
deactivate Hallway_BakedGroup. Be sure to Activate/Deactivate all the
children as well.
Step 75: Play and test.
Conclusion
Some great stuff is happening. At this point, the inventory system works, the
player can break into the front door, turn on the lights, and then shoot out
cameras. The game is almost done. We still need a few more added features.
First, we created a key that we can highlight (via the raycasting mechanism).
But we can't do anything with this key. Nothing happens there (other than
the highlight). We'll need to do just a bit of adjustment to make this key
work to open a door later. In the last tutorial of this chapter we'll create the
mechanism for the key to work.
Then we need to create a mechanism to allow the player to succeed and to
fail. Right now, the cameras sound the alarm if they see the player, but there
are no consequences to this besides a headache from the never-ending sirens.
And, if the player makes it all the way down to the bottom of the stairs and
finds the device, we haven't a way to indicate to the player that he has indeed
found the device and has beaten the game. In the next chapter we'll create
a simple health/success/failure engine to keep track of how successful the
player is.
Search WWH ::




Custom Search