Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Problems with spawning, death and respawning cycle

Jeea84Jeea84 Member
edited May 2020 in Programming

Hi, I'm new here and basically new to game dev as well, although I've been banging my head against Unity for two years, I sometimes feel I know nothing!


So my problem:

I used the 3D Game Kit to create a new scene, and then created a level in that scene. This gave me a number of benefits.

However, as soon as I got to adding checkpoints, Ellen has started acting really weird.

I've added an acid pool in a place, and to test it out, I went and jumped in, dragging it from the Kit Prefabs meant, I didn't need to write scripts about dying when entered, etc. 

Now I've already added a checkpoint somewhere a few steps behind this acid pool, so Ellen can respawn there when she's killed. However, this is where it gets really weird: Ellen respawns, dies, respawns, dies, over and over and over again without me doing anything at all, after dying once.

This is ridiculous! Please help!

There's something else, it wasn't bugging me till now, but I think I should mention it since it's still related.

When I start the game, Ellen spawns, dies and respawns, only after this routine I can start playing.

Why is this happening?? You'd think that completely using the 3D kit would help avoid facing such problems.

EDIT:

So I changed the locations of the checkpoints to see if they would work any different, but it's not working.

Ellen still dies as soon as the game starts, gets respawned at the first checkpoint, something I'm assuming to be the "default/game start" position checkpoint since it's got a sphere collider and came with the new scene. At first, when I changed the position of this default checkpoint to the location where Ellen was, she went on dying when the game started, over n over, the game was unplayable.

Then I changed it's position and she stopped dying repeatedly, but still dies once before I can start playing.


Next, the other checkpoints. As soon as she dies, she respawns on the 2nd checkpoint - the one that has a box collider for some reason I don't get, and which I dragged from the Prefabs folder, named it Checkpoint 1 - and dies over n over, meaning, I can't play the game.


So can anyone just explain in detail the thing about checkpoint? In layman's terms since I'm a beginner in coding; and using the 3D kit of Unity as an example so I can map it with something I know?

Thank you

Comments

Sign In or Register to comment.