Thanks Dutoit, that tutorial is nice but it uses arrays for storing the doors states...and I dont use arrays :/
Im still trying to figure out how to store the doors differents states using global variables...like you said.
Lets say the Level_1 Door is locked.
There is 1 key in this Level.
Once the key has been picked up, the door is unlocked
Level_2 is now available (and you can go back to level_1 (now unlocked) from there.
The lock mechanics I'm using is as follow:
Door boolean = "locked" (=solid)
Player pickup key -> Door: Set boolean to "unlocked" "(=not solid)
But how do I store this in a global variable ? that's where my brain is stuck...
I believe I need a global variable for each doors ?
So something like
Door_1= 0 (locked)
Door_1= 1 (unlocked)
And so on for door_2, 3, etc
But how do I link theses global to the appropriate door/layout ? (using a single event sheet and a single door object...which is/will be instanced)