Attempting to make a 'blind' monster

I’m trying to make a monster like The Figure in doors. Basically, it’s blind, and relies on sound to ‘hunt’ the players, it patrols until it ‘hears’ a player.

I’m thinking of the best way’s to achieve this. These are the only two methods that came into my mind:

  • Raycasting, say x (small number) studs, in all directions, if it finds a player and they’re not crouching, they get chased. This would give the impression that it “heard” the player. The only issue I see is that it might be more complex for longer distances and of course, other sorts of sounds.

  • PlaybackLoudness. I know that this is a sound property. I understand it might be possible to loop through all the sounds in the area, and work out their playback loudness and compare that to the distance to determine if the monster should ignore, “check it out”, or run after it.

The truth is, I cannot think of any other ways and am genuinely not sure what is the best way to accomplish this, which method(s) should I use in this scenario (for working out sounds), actually working them out or raycasting, or some other method I cannot think of?

Thanks for any advice.

3 Likes

This might help you out:

Here’s everything that I suggest:

  • Make a hitbox that checks if the player is moving
  • Make things inside the room that make noise, whenever touched if the monster is near the person run after RootPart

I don’t think your solutions will achieve the best results. The raycasts will not be accurate unless you’re doing too many which will cause havoc on performance.

The figure in Doors most likely tracks the players movement. You can do this with a simple heartbeat connection. After tracking the movement, if the player moves x amount of distance, it’ll check if the player is crouching. If the player isn’t crouching or the player is too close to the figure, it’ll start chasing them.

Since there wasn’t a script provided I can’t really edit much, but that logic should be performant and allow for you to have an expansive system so you can change things later if you need to.

1 Like