Hi again!
I am having a small problem where the StopTracking method of QuestCondtion is being called twice after calling SetTrue().
The screenshot above should provide enough context. Please let me know if something is not clear.
So after the textEvent is invoked, the console will print "a" twice.
My question is if it is intended or maybe I am doing something wrong.
Thanks in advance.
Problem with custom QuestCondition
Re: Problem with custom QuestCondition
Hi,
That's a safegaurd. The condition should only be actively checking when its node is active. When the node changes state to true or inactive, it tells its conditions to stop checking. When the entire quest's state changes, it also tells all nodes' conditions to stop checking in case they're currently checking. This handles the edge case where something manually forces the entire quest's state.
If you're concerned about this in your custom condition, you can set a bool true in StartChecking. Then, in StopChecking you can check if the bool is set to true. If so, stop checking and set the bool false.
That's a safegaurd. The condition should only be actively checking when its node is active. When the node changes state to true or inactive, it tells its conditions to stop checking. When the entire quest's state changes, it also tells all nodes' conditions to stop checking in case they're currently checking. This handles the edge case where something manually forces the entire quest's state.
If you're concerned about this in your custom condition, you can set a bool true in StartChecking. Then, in StopChecking you can check if the bool is set to true. If so, stop checking and set the bool false.
Re: Problem with custom QuestCondition
Thank you for your explanation