holding breath

Hi i got an idea i want to try and make for a little horror game I want make. I want it where I can hold LMB and hold the breath so the ai cant hear. but because I not used ue5 in ages I pretty much new again what can I do to achieve this. I made a simple animation for the mouth covering in the third person template and using it as a “true first person”

Hey @LWHITTY12! Welcome back!

So what have you done so far? Do you have an AI enemy with perception (listening) on it yet? Can you hide? Where are you at with everything besides the animation?

Thank you for the reply. So far I got the animation and did layer blend per bone and I need to make it when you hold lmb the character put his hand over mouth so far it just that bit I want to get working. I might be able to get AI later

I imagine its similar to a health system

I would suggest prototyping the game in UEFN/Fornite if that is at all possible. I had a language learning game I wanted to make in Unreal but was able to make a version of it UEFN within a couple of weeks. It might have taken a year to do in Unreal. In UEFN, they now have Input Devices that now allows you to do something in line with what you are describing. You can remap the mouse so that holding down the LMB and then releasing will tell you how many seconds have passed. You could easy use that to code some logic about holding breath or something like that. Also, the first person player has a lot of animations built in so you can do walking, running, jumping, crouching, swimming, open doors, the whole works pretty much, just a thought.

hi i go the hiding mechanic working thanks. it just so far proof of concept prototyping ideas

hi i got the stamina and oxygen working i just need to fix a bug they got.