Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by gustavim15 · Jun 21, 2016 at 03:10 PM · unity 5respawnresetreloadcheckpoint

How Checkpoint works?

Hello everyone... I'm developing a 2D plataformer game on Unity, and my question is: How work the checkpoint system on the other games?

Because I've already done the checkpoint like dying, and respawn on the checkpoint position, but what about the monsters I killed? and some puzzle I started to do... I can't just reload the level, because I can't reset monster and puzzle that I've already passed before the checkpoint. I don't know if I was clear enough... Sorry my bad english and thanks!!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SoloDeveloper · Jun 21, 2016 at 03:39 PM 0
Share

create a vector2 and update the position once you got to the checkpoint (OnTriggerEnter2D). Every time you re spawn, you make the player's position to the vector2

avatar image gustavim15 SoloDeveloper · Jun 21, 2016 at 04:27 PM 0
Share

@SoloDeveloper , Thank you for your reply, but you didn't understand.

I know how to do it, but I can't only move the player position to the checkpoint. What about the scene? Enemys that I killed, or puzzle that a started to pass, must be reseted, you see? I could reload the scene, and move the player to checkpoint position, but the problem is what I've already passed. Everything will reset, but must reset only from checkpoint forward.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by awest · Jun 21, 2016 at 04:43 PM

Typically a checkpoint does reset the puzzles and monsters prior to that point. It uses an object with Don'tDestroyOnLoad to save a couple variables like position, point, lives, etc. That would allow you to reload the level and keep important changes. The games that use this method usually don't require the player to go backwards.

You could add in booleans to the checkpoint system and have puzzles/monsters check their state at the start, but at that point you might as well implement a game saving script. It would collect data and export it to a textfile that could be loaded back in at the start. I've used this in the past. It's good for most cases, but if you're into coding I would recommend writing your own. Saving and Loading data

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image gustavim15 · Jun 21, 2016 at 05:29 PM 0
Share

@awest, Thank for your reply...

I was thinking on save this variables, and reload the scene, but the problem is that player can't go backward. As I understand, If the player could go backwards, I'll need to have scripts to control the state of puzzles/monsters, and them reset only what is after checkpoint, that what you meant?

avatar image awest gustavim15 · Jun 21, 2016 at 06:34 PM 0
Share

There are many ways to save things. I was just suggesting a couple options with helpful links. I would recommend watching the video tutorial "Saving and Loading Data." That should give you more specific advice so you can decide which method is best for your game.

avatar image gustavim15 awest · Jun 21, 2016 at 07:49 PM 0
Share

Ok, It will help me a lot. Thank you for your patience and attention! :D

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

91 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Respawn point 1 Answer

Death Countdown Area 0 Answers

Assets/Scripts/RespawnMenu.js(8,20): BCE0018: The name 'MouseLook' does not denote a valid type ('not found'). Did you mean 'UnityStandardAssets.Characters.FirstPerson.MouseLook'? After Upgrading to Unity 5 0 Answers

Reset rotation of gameobject 1 Answer

How do i put "Wasted!" after respawn? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges