Hello,
I hope you are doing well! Just a quick question on conditional aborts.
Is there away to detect if a condition is being evaluated as part of a conditional abort?
For example:
The problem I am having is that 'm_ActivateStuff' is being reset on the conditional abort evaluation. When the tree is run after the conditional abort, the condition returns failure. I can work around but this would be cleaner.
Thanks in advance!
I hope you are doing well! Just a quick question on conditional aborts.
Is there away to detect if a condition is being evaluated as part of a conditional abort?
For example:
Code:
public override TaskStatus OnUpdate ()
{
if (m_ActivateStuff)
{
if (!IsBeingEvaluatedFromConditionalAbort()) //-- ensure we only reset the flag when running outside of conditional aborts evaluation
{
//-- Reset flag
m_ActivateStuff = false;
}
return SUCCESS;
}
return FAILURE;
}
The problem I am having is that 'm_ActivateStuff' is being reset on the conditional abort evaluation. When the tree is run after the conditional abort, the condition returns failure. I can work around but this would be cleaner.
Thanks in advance!