If i have a global variable that can range from 3 to 0, what would i need to attach the script to to detect when this variable has reached 0 and reset it back to 3?
this is for a little item dispenser in a shop that each time the global ticks down it disables one item on the shelf. when it reaches 0 the shop is sold out. when the global gets reset, the items get re enabled.
also, do you guys think i should reset the global when the player leaves the cell, or should i put it on a short 5 minute timer?