Page 1 of 1
Is it possible to make darkness kill you?
Posted: Wed Dec 09, 2020 11:55 am
by koob_koob
I'm trying to make a level where being in total darkness kills you, but I don't know if its possible.
Re: Is it possible to make darkness kill you?
Posted: Thu Dec 10, 2020 4:53 am
by Hoeloe
The simplest way would be to use Colliders to attach a Circle collider to each light source, and then just check those to kill the player. This will not work with shadows however, getting it to work with shadows is a lot more complicated.
Re: Is it possible to make darkness kill you?
Posted: Thu Dec 10, 2020 2:56 pm
by koob_koob
Hoeloe wrote: ↑Thu Dec 10, 2020 4:53 am
The simplest way would be to use Colliders to attach a Circle collider to each light source, and then just check those to kill the player. This will not work with shadows however, getting it to work with shadows is a lot more complicated.
cant i just make a timer that kills the player if it reaches 0, but refills if the player touches these colliders?
Re: Is it possible to make darkness kill you?
Posted: Thu Dec 10, 2020 8:33 pm
by Hoeloe
That would just mean you can stay alive out of light for a limited time, but it still wouldn't work for shadow casting (I'm referring to the "shadows" setting on the Darkness controls, not "standing in darkness").
Re: Is it possible to make darkness kill you?
Posted: Fri Dec 11, 2020 5:22 am
by koob_koob
ah, ok