How to make a player lose if they don't reach specific areas quick enough?
Hello, I'm very new to coding and I primarily resort to watching YouTube tutorials step-by-step. The language that I use is C#, and I'm wondering how I would go about having a player die if they don't reach specific areas in time. The game I'm attempting to make is where a 2D sprite walks down a street and hides from people frequently looking through their windows by being in the darkness between street lamps. Would anyone know how to go about doing this? Thanks. I've attached a picture of the game so far, to possibly help visualize. I'm looking for the "safe zone" to be between the street lamps, where the light doesn't reach.
Answer by tormentoarmagedoom · May 14, 2019 at 08:24 AM
Hello. as you are commencing, is normal you ask for this, but this is a very basic thing. You should be able to create your own script. I will give you some idea what you will need...
Find/Learn:
Collider - Trigger (for player detection)
Time.deltaTime (to make a timer)
Whith this 2 elements you should be able to do it.
Bye!
Your answer
Follow this Question
Related Questions
"Invalid argument"? 0 Answers
How can i do an action after i detect a collision2D && and a key/mouse button being pressed? 1 Answer
Player Not Moving With Platform 2D 1 Answer
How to make the next level load based on 2 characters touching a collider? 0 Answers
clamp position 1/4 of a circle 2D 1 Answer