Crewmate and Player MovementPlayer Spectator PawnSo far for the Player Pawn, I was able to get it to fly around and have no collision similar to how the Unreal Editor camera works. I also gave it the function where the camera will only turn when the player holds the right mouse button. The cursor will hide and lock in place when this button is pressed. If the right mouse button isn't held, the player is free to use the mouse for clicking in the scene which will be used later in the project. I intend for the player to be able to hover the mouse over a crewmate and have them glow to indicate which crewmate they are going to "Select" if they click the left mouse button. Upon clicking on a crewmate being hovered over, the player will be able to see all of the information that crewmate remembers at that moment and which task they are about to attempt next. I initially planned for the player's camera to attach to that crewmate, but I feel that functionality would just take away from the player's ability to easily swap between "Selected" crewmates. "Camera" BugDuring the creation of the Player Spectator pawn, I ran into a nasty engine bug which took 1.5 hours to resolve. Basically, the pawn's initial name was Player Camera, but Unreal apparently does not like the use of the word "Camera" in any created C++ class, because when I made a child Blueprint class from the Player Camera C++ class, the engine would instantly unload the class whenever the engine restarted. Turns out putting "Camera" anywhere in the name of a class causes the class to not stay valid in Blueprint form. I'm making note of this as a warning to any who read this about this issue and to indicate an extra detail I've learned in the creation of the Player Spectator class. Waypoint Location NameI was able to add the location name to the Waypoint class as an FString. I plan to use this name for helping an NPC to know which room on the ship they are headed towards. However, I'm also thinking of just having the tasks themselves be usable as the indicators to the Crewmate on where they should go to perform said tasks and just use the waypoints for the Crewmates' meandering around the map. Main MenuAs shown in the video about, I am able to reset the game to the main menu at any point by pressing my new debug key: the "M" button. This is done by making a call to the ResetGame function in the AIDeductionGameMode. In said function, the positions of the crewmates are reset along with the player spectator, the player spectator's ability to move and turn is shut off, and the crewmates' behavior trees are stopped. I was, however, unable to make an updated design for the main menu in the allotted time due to trying to correct the "Camera" bug. What's Next?This next week, I will begin the implementation of the core elements of the gameplay: the goals for the crewmates to win the game. This will mean that I will be splitting up the crewmates' behaviors between the killers and the innocents. Specifically, I will be working on:
If I have extra time, I will also implement:
Want to Download the Project?
0 Comments
Leave a Reply. |
Coleman LevyWelcome to my blog! Archives
August 2021
Project |