Zahk
Member
I'm trying to do something very simple - I want to talk to an NPC, and then have them say something else after you talk to them the first time, even after you leave and return to the room they're in.
Now I know I can keep track of the variable that changes this with a Global Variable or by making the object persistent, but I don't really want the NPC to be a persistent object, and I also don't want to use a global variable, for two reasons: the first being that I'd rather use a universal but object-specific variable that I can just add to my NPC-interaction-script, and the second reason being that I'd rather the variable be tracked on the actual NPC, instead of having to constantly go back to a global variable object where I set up all my global variables for every single time I want to make a new one. I'm making an RPG, and there's bound to be a lot of little switches like this.
I feel like I'm missing something obvious. Is there any other way to set up a simple switch like this?
Now I know I can keep track of the variable that changes this with a Global Variable or by making the object persistent, but I don't really want the NPC to be a persistent object, and I also don't want to use a global variable, for two reasons: the first being that I'd rather use a universal but object-specific variable that I can just add to my NPC-interaction-script, and the second reason being that I'd rather the variable be tracked on the actual NPC, instead of having to constantly go back to a global variable object where I set up all my global variables for every single time I want to make a new one. I'm making an RPG, and there's bound to be a lot of little switches like this.
I feel like I'm missing something obvious. Is there any other way to set up a simple switch like this?