I have a class which is joined by a level NPC (not putnpc2) which is a door. I've added a feature where you can lock and unlock your house door. However, it's not saving this flag, it's as though it's resetting after some time.
Putnpc2 saves these flags and only change them when necessary- but level joined npcs revert to the origional code if someone enters and it hasn't been entered in a while (onCreated is called again)
Is there any way to store this flag without it being wiped? I was thinking of making it a level variable, but wouldn't that just do the same thing? (clear it after someone enters after it's been empty for some time)