justalexi
New member
Hi!
I'm trying to implement a conditional abort branch when the character takes damage, but the condition node "HasTakenDamage" despite returning Success doesn't pass the execution further. It looks like TaskStatus switches too quickly back to Failure, and as if "Self" abort type was turned on the next nodes are aborted.
What is the correct way to handle this kind of behaviors?
public override TaskStatus OnUpdate()
{
if (_hasTakenDamage)
{
_hasTakenDamage = false;
return TaskStatus.Success;
}
return TaskStatus.Failure;
}
I'm trying to implement a conditional abort branch when the character takes damage, but the condition node "HasTakenDamage" despite returning Success doesn't pass the execution further. It looks like TaskStatus switches too quickly back to Failure, and as if "Self" abort type was turned on the next nodes are aborted.
What is the correct way to handle this kind of behaviors?
public override TaskStatus OnUpdate()
{
if (_hasTakenDamage)
{
_hasTakenDamage = false;
return TaskStatus.Success;
}
return TaskStatus.Failure;
}