Is there a way that a spawned bot can detect player's made noise (footsteps for instance) for a stealth type game.
Announcement
Collapse
No announcement yet.
detecting noise
Collapse
X
-
In theory it would work like each footstep has a soundEmitted variable, set to different amounts in various states and walking on various materials (walking on snow emits less sound than on steel or concrete), the soundEmitted variable can be used as a radius for a 2D circle against a bots soundHeard or soundHearing, which can change in different environments (like heavy rain = less sound heard), which could be used in a 2D circle and a simple circle collision test can verify if the soundEmitted and soundHeard circles overlap.
Of course, this is just my theory on how it would work.
-
Thanks but please speak english you sounded Martian to me....... where is the "makenoise" function I can't find it in Content Browser->Actor classes neither can I find HearNoise ... or are you talking about scripting language? if so I am lost. Those functions you talk about would be a perfect solution to my question-problem though.
Your footnote says if one has questions pertaining to this or that to ask you but where? email or web page ???
Thanks
Comment
-
When you mentioned bot for a custom stealth gametype, I assumed you were going to create custom uscript code (as using kismet for such a thing would be 'suboptimal' and needlessly complex).
The makenoise function can be called from the same function that plays the footstep sounds in the Pawn class, the AI code "hears" the "noise" by having the HearNoise event called, and in this section is where you can direct your bot to investigate the location of the noise, ignore it (and say something), or freak out etc. (just like the bots in every other stealth game using the UEngine like SplinterCell, RainbowSix Ravenshield etc.).
Comment
Comment