Hi
I would like to reuse the key pickup prefab) and the Door open system more than one time in my level. But as the HasKey is picked and then true at the next door i will have the door open automaticaly. I was thinking to have a trigger after the door to swith off the HasKey or maybe there is better option / more elegant ?
Thanks
Hey Emmanuel!
That sounds like it would work- but if the player missed the trigger it might make the next door open already-
You can make a key var for each door- HasKey01, HasKey02 etc so that each door has its own variable-
If you wanted to extend that so that when the player quit/loaded the game and you wanted the game to remember what doors were open/closed- you could use those bools to set player pref bools- and each time the scene loads the doors check the player prefs too get their state
perfect, for now i will just add a trigger at the out of the door as the pla
perfect, will do the HasKey number change
You would have to create a new bool variable for each door like HasKey01 for door01 and HasKey02 for door02 and so on- then its just up to you to keep track of what key works for what door