How to make a checkpoint on Unity [EASIEST WAY]

  Рет қаралды 12,537

PavLos MavRis

PavLos MavRis

Күн бұрын

Пікірлер: 59
@andreyandreev_sw
@andreyandreev_sw 3 жыл бұрын
Clean, easy, and it's working perfectly fine.
@riccardocasata9073
@riccardocasata9073 2 жыл бұрын
agree
@oscar-vg2ns
@oscar-vg2ns 3 жыл бұрын
Thanks for this video! This really helped and was the only checkpoint tutorial that worked!
@muhammadgulzaib7567
@muhammadgulzaib7567 2 жыл бұрын
so clean and short, to the point.
@karma.codes_
@karma.codes_ 2 жыл бұрын
Very clean implementation and so helpful
@khaleddergamer9075
@khaleddergamer9075 Жыл бұрын
danke für es Video es ist sehr gut für mein spiel und mein spiel heisst parkuhr Game probierts aus
@mmazuk1958
@mmazuk1958 2 жыл бұрын
Thank you!
@rychusan3837
@rychusan3837 2 жыл бұрын
Hi @PavLos MavRis how do i add more checkpoints if i want to ?
@PavLosMavRis
@PavLosMavRis 2 жыл бұрын
Hi @RychuSan, you can check my new video here kzbin.info/www/bejne/aIelo2WJndCLd7s which I show how to have as much checkpoints as you want.
@oopppnn000rf
@oopppnn000rf 3 жыл бұрын
Thanks man you got subscribe!!
@mistersali2501
@mistersali2501 Жыл бұрын
Hi, So I have A Problem. Did Everything like in the video(Except:The Flag is an 3d cube but also named flag_med ).I have an 1st Person JumpnRun Game and Added the Checkpoint. So, When I go on the Checkpoint it Dissapears, fine, that worked. Buuuut when my Player(PlayerCapsule) falls however from the platform, it doesnt respawn. It just falls and falls and falls. Im hoping for a Response :/
@ankitsharma-ud7tq
@ankitsharma-ud7tq Жыл бұрын
You have to put an collider down the world and if player collide with it then you can apply death function its simple to code
@khaleddergamer9075
@khaleddergamer9075 Жыл бұрын
Das war sehr einfach zu machen 👍
@newbpod
@newbpod 3 жыл бұрын
how did u get the blue ground texture.. also love the video! i liked it
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
It's a material that I created and you can do it too. Just right click in the assets folder then create -> Material and then for the settings of the material you can set a custom colour for your material, after you are finished you can drag and drop the material on your object that you want to change the colour.
@newbpod
@newbpod 3 жыл бұрын
@@PavLosMavRis VERY COOL im going to sub too ur scipt was so easy and just perfect!!
@ankitsharma-ud7tq
@ankitsharma-ud7tq Жыл бұрын
will it work if i put more checkpoints and will it save checkpoints when getting out of play mode
@skelly2946
@skelly2946 3 жыл бұрын
thanks man, helped a lot
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
Glad to hear it!
@arnauz11
@arnauz11 2 жыл бұрын
How i can make that: i spawn in point A, i walk a few meters and take the chackpoint B. What I would like is that when I leave the game and re-enter, I appear in point B
@PavLosMavRis
@PavLosMavRis 2 жыл бұрын
Stay tuned my friend because in the next days I will upload a new tutorial in which I will show you how to do that, but a little tip is to use an array or a list and contain all of your checkpoints and when you past a checkpoint save the index of the checkpoint with playerprefs from that list and when you come back to the game use the saved index to find your checkpoint from the array and spawn your player. Enjoy!!
@talha_xxl
@talha_xxl Жыл бұрын
thank you bro!
@newbpod
@newbpod 3 жыл бұрын
Sir once last question when i respawn i respawn at the checkpoint, But i cannot move my player... Thoughts?
@TheViciousCod
@TheViciousCod 2 жыл бұрын
Do u still need help i might be recommend brackeys respawn video that might help
@newbpod
@newbpod 3 жыл бұрын
helped so muchh
@Radikayudha
@Radikayudha 3 жыл бұрын
what should i do if the object destroy but cannot respawn in the checkpoint
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
Which object the flag(checkpoint) or the player?
@combatstriker512
@combatstriker512 3 жыл бұрын
How to FIx this"Assets\PlayerCheckPoint.cs(13,43): error CS1061: 'Transform' does not contain a definition for 'Position' and no accessible extension method 'Position' accepting a first argument of type 'Transform' could be found (are you missing a using directive or an assembly reference?)" Pls Help
@deppressedpepe5843
@deppressedpepe5843 3 жыл бұрын
how can i make the script recognise multiple other checkpoints instead of just the one
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
Actually depends on what exactly you want to make, you can make an array or list and then add inside every gameobject which is your flags, but if you want to make a game that if you collect a flag and move forward and you don't care for your previous checkpoints you can do a small change on the script. The code is like this: spawnPoint = flag.transform.position; Destroy(flag); change it into that: spawnPoint = other.gameObject.transform.position; Destroy(other.gameObject); What that change does simly it recognise which flag/checkpoint you pass and it will get rid of the previous checkpoint. And also you can delete the line which says public GameObject flag;
@antonymc6388
@antonymc6388 3 жыл бұрын
hey, check for this video, its very simple way to make an universal check point System : Unity 2021 - Universal CheckPoint System
@newbpod
@newbpod 3 жыл бұрын
2 things, 1.if i attach the scipt to the camera i will teleport back but just keep falling... 2. if i attach the script to my player i will respawn but not be able to move
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
The script should be on the player not on the camera
@bubblessword8090
@bubblessword8090 3 жыл бұрын
Does thin only wprk for rigidbodies?
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
No, what you need to make it work is the colliders, the rigidbodie is used to apply physics to the ball and make it move around.
@bubblessword8090
@bubblessword8090 3 жыл бұрын
@@PavLosMavRis I was able to fix the issue. Auto sync transformations is off by default. So I turned it on. Thank you for the cool tutorial :)
@supser7827
@supser7827 3 жыл бұрын
thanks!!!
@newbpod
@newbpod 3 жыл бұрын
my player keeps respawning yes, but it teleports through the terrain... pls respond
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
Do you have collider components on the terrain and on your player?
@Lache-ix2ho
@Lache-ix2ho 3 жыл бұрын
after respawning my character does not move, and I did everything the same as the video, you know what it can be?
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
I suppose you don’t get any error messages right? Are you using a rigidbody component to move your character, if yes make sure that the option “is Kinematic” is not enable and also the “constraints” are all disable.
@Lache-ix2ho
@Lache-ix2ho 3 жыл бұрын
@@PavLosMavRis I'm not using a rigidbody to move my character, but an FPS controller, and no error message appears, the player respawns, but from then on it doesn't move
@Mielesplayz
@Mielesplayz 3 жыл бұрын
how do you fix your character getting stuck in the air after dieing?
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
You get stuck or you falling without stoping (you can check your Y-Axis of your character for that) also do you get any error?
@Mielesplayz
@Mielesplayz 3 жыл бұрын
@@PavLosMavRis i dont fall anymore, when i respawn i just get stuck in the air. There is no error.
@rickyraffinazwankuntadi3893
@rickyraffinazwankuntadi3893 3 жыл бұрын
Can you share the script in Google Drive because I cannot following you I have a bad Microsoft visual 2019 please?
@mmazuk1958
@mmazuk1958 2 жыл бұрын
Hello! The code was very good, but I failed to implement 2 checkpoints only 1. You can give advice?
@PavLosMavRis
@PavLosMavRis 2 жыл бұрын
Hello, you can check my latest video which is an updated version of how to create a checkpoint system. Through the video you can learn how to have multiple amount of checkpoints and also how to spawn from your last checkpoint after you exit and come back to your game. Enjoy!!
@mmazuk1958
@mmazuk1958 2 жыл бұрын
@@PavLosMavRis Thank you.
@kingiwakes_official
@kingiwakes_official 2 жыл бұрын
I've did everything and I got 8 errors
@PavLosMavRis
@PavLosMavRis 2 жыл бұрын
Hi @KingIWakes, can you please describe some of the errors and see if we can figure it out together? Also I have uploaded an updated version of the checkpoint system, you can check that too, it might solve your errors.
@satyadev2011
@satyadev2011 Жыл бұрын
It is not working for me
@matthew6637
@matthew6637 3 жыл бұрын
how are you making the ball respawn back up on the blue ground when it falls off?
@hollowm.8416
@hollowm.8416 3 жыл бұрын
he set it up by the if statement after void update he set it to y -20f, meaning once it reaches -20 it sets back up to the designated spawn point which he did above that if(gameupdate.transfrom......
@PavLosMavRis
@PavLosMavRis 3 жыл бұрын
Basically i'm checking every frame, when the ball's position on the Y-Axis goes below -20 and when it goes below -20 i'm setting the ball's position to be equal with the spawnPoint which is a vector3.
@matthew6637
@matthew6637 3 жыл бұрын
@@hollowm.8416 Thank you
@matthew6637
@matthew6637 3 жыл бұрын
@@PavLosMavRis Thank you
@EmadShadiz
@EmadShadiz 11 ай бұрын
not work
@aaronz8000
@aaronz8000 19 күн бұрын
For the lazy people this is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerCheckpoint { public gameObject flag; Vector3 spawnPoint; //Start is called before the first frame update void start() { spawnPoint = gameObject.transform.position; } //Update is called once per frame void Update() { if (gameObject.transform.position.y < - 20f) { gameObject.transform.position = spawnPoint; } } private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Checkpoint")) { spawnPoint = flag.transform.position; Destroy(flag); } } } Edit: I didn't even need need this💀
Unity Simple Checkpoint System Tutorial
9:01
MoreBBlakeyyy
Рет қаралды 9 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
PAUSE MENU in Unity
12:13
Brackeys
Рет қаралды 1 МЛН
Simple Checkpoint System in Unity
16:06
Code Monkey
Рет қаралды 48 М.
Simple Checkpoint System in Unity
8:01
GDTitans
Рет қаралды 14 М.
Unity C#Tutorial: Opening A Door With A Key
14:20
Killer Whale
Рет қаралды 18 М.
How to Build A Save System in Unity
9:41
Game Dev Guide
Рет қаралды 173 М.
6 Years of Learning Game Development
17:20
Cobra Code
Рет қаралды 276 М.
5 Minute DIALOGUE SYSTEM in UNITY Tutorial
5:11
BMo
Рет қаралды 180 М.
I made a full GAME in 400 HOURS - this is how - in 19 minutes!
19:00
How to Collect Coins in Unity 3D Tutorial 2023 (Updated)
5:07
Rigor Mortis Tortoise
Рет қаралды 19 М.