Hey guys, how are you all? So, my current problem is that I want to create an affection system to my game where, when you met the requisites, the affection with x character levels up. I have been using variables to determine each character's affection and conditional branches to raise them.
Now, for the problem: I want to set a system where, if you raise this variable to a certain point, you receive a reward. You would collect these rewards by speaking to them.
The issue is, I don't knoww how to do that... I thought of using conditional branches to give the player the reward but, this would cause the event to give infinite rewards. To circuvent this, I thought of the following method: Create a second variable and increase its value each time the player collects the reward and, create two conditional branches to give the reward. Example:
Player receive affection level 1 -> collect reward -> second variable goes to value 1
Player has level 1 affection and tries to receive the same reward again -> conditional branch that only activates when the value of the second variable is 0 forces the event to exit without giving another item.
Second level reward needs the second variable to be value 1 or otherwise, it won't activate.
(to be honest, I just thought of this method while writing this)
Is this the most efficient way? If I have 20 different characters, this wwill be 40 variables just for this system. So, will this suffice or do you guys have another suggestion to help?
Now, for the problem: I want to set a system where, if you raise this variable to a certain point, you receive a reward. You would collect these rewards by speaking to them.
The issue is, I don't knoww how to do that... I thought of using conditional branches to give the player the reward but, this would cause the event to give infinite rewards. To circuvent this, I thought of the following method: Create a second variable and increase its value each time the player collects the reward and, create two conditional branches to give the reward. Example:
Player receive affection level 1 -> collect reward -> second variable goes to value 1
Player has level 1 affection and tries to receive the same reward again -> conditional branch that only activates when the value of the second variable is 0 forces the event to exit without giving another item.
Second level reward needs the second variable to be value 1 or otherwise, it won't activate.
(to be honest, I just thought of this method while writing this)
Is this the most efficient way? If I have 20 different characters, this wwill be 40 variables just for this system. So, will this suffice or do you guys have another suggestion to help?