I set up a counter for a task that uses messages to add or subtract. "Modify by parameter" is used to set the conditions for receiving A message to increase by 1 (the parameter is 1) and receiving B message to decrease by 1 (the parameter is -1). The initial value is 1 and the condition is reduced to 0 or below. The increase was fine, but the decrease never took effect. I changed "modify by parameter" to "set to parameter" and the condition passed.
I checked it so many times that I didn't know what was wrong, and it bothered me.
There's something wrong with the subtraction of counters
-
- Posts: 8
- Joined: Fri Jan 14, 2022 6:17 am
-
- Posts: 8
- Joined: Fri Jan 14, 2022 6:17 am
Re: There's something wrong with the subtraction of counters
I found that if the automatic start parameter is the same as the one set in the counter, the task will increment the count at the same time it starts, which is not what I want. What I want is for the first message to trigger the task to start and for the messages after that to increment the count.
I need some help
Re: There's something wrong with the subtraction of counters
Hi,
Is this your current question?
To do that, add a Set Counter Value action to the quest's States > Active > Actions to set the counter value to zero. If you prefer, you can add the Set Counter Value action to the Start node.
Is this your current question?
If you have other questions about this, please let me know. For now I'll assume your question is that, when the quest automatically starts, you want the counter to start at zero.startfromzero wrote: ↑Fri Jan 14, 2022 7:50 amI found that if the automatic start parameter is the same as the one set in the counter, the task will increment the count at the same time it starts, which is not what I want. What I want is for the first message to trigger the task to start and for the messages after that to increment the count.
To do that, add a Set Counter Value action to the quest's States > Active > Actions to set the counter value to zero. If you prefer, you can add the Set Counter Value action to the Start node.
-
- Posts: 8
- Joined: Fri Jan 14, 2022 6:17 am
Re: There's something wrong with the subtraction of counters
If do this, the mission is an immediate success.Because the conditions for success are zero or less.
To avoid immediate success, I set the initial value to 1.what I want is that counter to start at 1.And I tried what you said, and it still didn't work.
Looks like "Set Counter Value to one" was executed first,then increment the counter.So it's still going to be 2.
To avoid immediate success, I set the initial value to 1.what I want is that counter to start at 1.And I tried what you said, and it still didn't work.
Looks like "Set Counter Value to one" was executed first,then increment the counter.So it's still going to be 2.
Re: There's something wrong with the subtraction of counters
I'll give this some thought and get back to you. It's an unusual setup.
-
- Posts: 8
- Joined: Fri Jan 14, 2022 6:17 am
Re: There's something wrong with the subtraction of counters
Hi,
Import this package and add a "Reset Counter" quest action to the Start node's True section:
QM_ResetCounterQuestAction_2022-01-15.unitypackage
Select your counter and set the value to 1.
Import this package and add a "Reset Counter" quest action to the Start node's True section:
QM_ResetCounterQuestAction_2022-01-15.unitypackage
Select your counter and set the value to 1.