- Home /
Checkpoint Question
Hello,
First I feel I should state I am not asking for scripts, I am just confused about how to go about implementing checkpoints in a game I'm already working on.
In short I have a 2D platform game I'm making with my friend (he's doing the artwork) in where it's a Mario parody. Basically the concept is simple (and most likely been done before) but when you get 100 coins instead of getting a life you die. We wanted to make a really hard platformer, my friend is passionate about that style so I told him since he draws well I'd help him make a game as such. Anyway...
I have most of the gameplay done for the most part with place holder graphics, what's throwing me off is setting up a checkpoint system. See if it was a game where you fell to your death I would know exactly what to do. But as it is now the game is set to spawn you at the beginning when you die by the death of 100 coins.
I'm thinking all I have to do is make a spawning script, and then where my code states to spawn to the beginning I call upon the spawning script.
The reason I'm making a Unity Answers thread is I'm still pretty new to programming. And most everything I do is off of a tutorial or example project. So it really helps when someone explains what to do. Again, I don't expect or need you to give me the finished scripts or anything. But if someone could just talk to me about what a good way to go about this would be I'd be very grateful.
Thank you for your time!
Yeah. Just make it so that each checkpoint has a trigger collider that updates a variable somewhere that informs the spawning system which spawn point to use. Any time you want to spawn the player then you just tell spawning system to spawn the player at either the beginning of a level or at the checkpoint.
What you need is three things: a Checkpoint, a Spawner, and a SpawnPoint.
Okay! That makes sense! Thank you so much for the response! I think I can do it now. I was just a little confused about exactly how to go about it.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Adding a Sprite 1 Answer
How to alternate images in 2d unity 0 Answers
Bounce value not change in script for 2D object in Unity4.3. 1 Answer
2D Animation does not start 1 Answer