Continuing development for Week 2 I started working on the stealth system that will be the crux of the core gameplay loop involving the AI in the game. Before getting into that though I found that I was able to fix most of the montage issues by swapping the function that I was calling to play them.  
The stealth system needs to have both a front end for the player to understand what's going on and a backend for the actual work being done by the AI, so I started by making the front end aspects; being a detection meter and a vision cone that will become visible in the finished game as an ability the player can use. The vision cone also doubles as my way of controlling where the AI is allowed to detect the player. When the player overlaps the cone, the AI is allowed to detect the player which is a good solution to the AI Perception UE4 ships with being able to detect players at seemingly unfair vertical angles. 
Unfortunately I can't seem to get the inverse to work for some reason as when the player stops overlapping the cone the AI still allowed to detect them, which is a bug I will need to fix. The detection meter will fill either slowly or quickly based on if the player is crouched or standing then multiplied by how far away they are from the AI. When the meter is 25% filled the AI will be suspicious but not alerted and proceed towards the location that the player was when the meter was filled. Once the meter is filled entirely the AI becomes alerted and will engage the player based on what functionality they are given (which currently is simply chasing them). 
I also started working on the objectives system, which as of now is a simple system of displaying text and a marker to guide the player with a distance meter to show how far away the player is from their goal. 

You may also like

Back to Top