Hello and good day. This is my first time ever using a forum medium so hopefully I classified this post in the right place.
I need help with a mechanic. I'd like to make it so that the player is vulnerable in the darkness. Here is a diagram:
Enemies are repelled by light completely and can never enter the light radius: this also applies to mobile light sources including torches and flashlights (I'm sure this will be far more complicated, if even doable in this engine. If light dies, enemy immediately advances on the player.
Where would I start with coding this? I would appreciate the help!
Edit: Forgot to add - when there is not a tangible enemy, as in the diagram, the darkness itself will kill the player after a set amount of time passes without igniting another light source (Think kind of like Dont Starve.)
I need help with a mechanic. I'd like to make it so that the player is vulnerable in the darkness. Here is a diagram:
Enemies are repelled by light completely and can never enter the light radius: this also applies to mobile light sources including torches and flashlights (I'm sure this will be far more complicated, if even doable in this engine. If light dies, enemy immediately advances on the player.
Where would I start with coding this? I would appreciate the help!
Edit: Forgot to add - when there is not a tangible enemy, as in the diagram, the darkness itself will kill the player after a set amount of time passes without igniting another light source (Think kind of like Dont Starve.)