0
Answered

BT node: about the Mode of Use Conditions.

Quincy Huang 5 months ago in Behavior updated by Marti (Lead Developer) 5 months ago 3

I am wondering what is the difference between the Fail Immediately and Allow To Complete?

I guess:

Fail Immediately, will return fail once the conditions fail.

Allow To Complete, the conditions fail, but still can run the actions, and then, return fail.

Am I right? 

 

Unity version:
Game Creator version:
GOOD, I'M SATISFIED
Satisfaction mark by Quincy Huang 5 months ago
Answered

Yes, more or less you got that right. The thing is that Actions can be executed over an undetermined amount of time. If you have, for example the following Graph that does:


Condition:

If Player Can See Enemy

Actions: 

Wait 5 seconds

Debug Message "I saw enemy"

After the player sees the enemy, the actions start executing. If after 2 seconds, the player can't see the enemy:

- If conditions are set to Fail Immediately => The actions will stop executing and will return False

- If conditions are set to Allow to Complete => The actions will continue until the message is printed and then return False.

Hope this clears this out :-)

What if you want it to return true because the player saw the enemy and then took an action?

That's what the "Allow to Complete" is for