How to gather items that won't respawn into level?


I have 1 prefab placed throughout my level in 6 places; when the player finds all of them, they are granted a special ability…

There are also two checkpoints in the level; at any time the player can “restart from last checkpoint”

My problem is that when the player respawns the prefabs all respawn as well - I’m trying to make it so that whatever items the player collects, they are stored into the inventory - any items collected before a checkpoint shouldn’t respawn

here is my code for respawning

if(GUI.Button(new Rect(20,100,200,40), "Start From CheckPoint")) 
				bossArea = false;
				deadPlayer = false;
				Time.timeScale = 1;
				paused = unPaused;


any ideas? Thanks

Your respawn code isn’t what I would call repsawning - It is rather a complete reloading of the current level. You could either look into proper saving/loading (fairly complicated) or, aass a stop-gap solution that should work as well, create a gamecontroller-type object that stores information about the number of items collected and their cooresponding gameObjects in the scene. Set this controller to Object.DontDestroyOnLoad. Then, in each item’s Start() function, destroy the object if it hasn’t already been collected (by getting the information from the controller).

Hum. I guess this sounds even more complicated than saving and loading game states :smiley: