Return TaskStatus in OnStart

MrMemeseeks

New member
Hi all,

I've been wondering if it is possible to return the TaskStatus in the OnStart instead of only in the OnUpdate.
In the OnStart I do some validation of the action I want to perform.
If the action is invalid to perform I want to return a Failure right away.

I know that a workaround could be setting a flag in the OnStart and return Failure in the first tick of the OnUpdate but this is not the cleanest way to go in my opinion.

Is there maybe already another way to achieve this or could this be an option for the future?

Thanks!
 
When the behavior tree runs it will automatically call OnUpdate after OnStart. There isn't a way to have OnStart return a value and not call OnUpdate, unless you modify the runtime source. The usual route is to use a flag like you are describing.
 
Top