I am building the engine for the Text101 game we are making, I am going with my own story line but I want to keep track of each time a player enters certain states (E.G each time the player looks at the door I want the door counter to go up by 1)
you can find my code so far here
I already have int door declared before void start. inside of void start I have door = 0 and each time I look at the door I want that number to go up by one
what I have tried
door = door + 1
door++
door += 1
door =+1
all these options make the door number continuously go up by one every screen refresh however I want it to only go up by one.
one option (door =+1) will make it only go up to the number 1 and stop but then when I exit and renter the door state it is still only at 1 and not at 2
my question is how can I make my door counter go up by 1 each time I look at the door then how can I keep track of that number
just some added info the door counter is not going to be viewed by the player.
any help is appreciated thank you all!
