Cheo
Active member
Hello, I made a simple script dedicated to sound detection which contains a function using a sphere cast to detect nearby enemies that may hear a sound made by the player. I managed to use it in a weapon module, but I can't manage to use it with the Surface Effect script - my initial idea was to add noise detection parameters on surface effects (preventing the sphere cast on some and increasing the radius on others), and then call my custom script either in CharacterFootEffects' Footstep or SurfaceEffect's SpawnEffectInternal, but I can't manage to access my custom script from either of those two.
So that leads me to two questions : is there a way to access a simple MonoBehavior from this kind of script ? And is there maybe a better way to handle range checks based on surfaces ? Thanks in advance.
So that leads me to two questions : is there a way to access a simple MonoBehavior from this kind of script ? And is there maybe a better way to handle range checks based on surfaces ? Thanks in advance.