I know how to do this, but I was wondering if there was a way to simplify this.
I have a pool of 64 NPC's who are generated randomly at the beginning of the game. Well, what I wanted was a variable to be attached to one NPC, and each time you talked to them the variable increased by one. When the variable reaches 9, for the sake of this example, the NPC gets mad and tells you to stop bugging them.
I was wondering if there was a way to use just one variable for all 64 NPC's, so I'm not overloading my database with all these variables (I already have 64 switches for each respective NPC). The problem is, that if I reset that one variable, the NPC will go back to being friendly, and if I don't, all NPC's will be annoyed at the player.
To simplify my question, I was hoping there was a way that a variable could be stored to one specific event, and be reset at a completely different event.
I have a pool of 64 NPC's who are generated randomly at the beginning of the game. Well, what I wanted was a variable to be attached to one NPC, and each time you talked to them the variable increased by one. When the variable reaches 9, for the sake of this example, the NPC gets mad and tells you to stop bugging them.
I was wondering if there was a way to use just one variable for all 64 NPC's, so I'm not overloading my database with all these variables (I already have 64 switches for each respective NPC). The problem is, that if I reset that one variable, the NPC will go back to being friendly, and if I don't, all NPC's will be annoyed at the player.
To simplify my question, I was hoping there was a way that a variable could be stored to one specific event, and be reset at a completely different event.