Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revisionBoth sides next revision | ||
quick:timelimit [2018/06/22 14:36] – created kevinamores | quick:timelimit [2018/06/22 16:16] – [Explanation of the example] kevinamores | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Page Created | + | # Time Limit Decorator Guide |
+ | This tutorial continues the small example created in the BT tutorials, where the player moves his avatar in the " | ||
+ | |||
+ | In this tutorial, we will show how the time limit decorator works in a BT | ||
+ | |||
+ | If you want to experiment with the final version of the demo prior to following the tutorial, you can find it in the `Samples\ProgrammersQuickStartGuide\Done\DoneScene\TimeLimitTestScene.scene` folder in the Behavior Bricks package. | ||
+ | |||
+ | <!-- Please, be aware that although the screenshots of this guide were taken using Unity Pro, the examples can be implemented, | ||
+ | ## Explanation of the example | ||
+ | |||
+ | The decorator is used to indicate that a given action has to be completed in a established amount of time. If the entity can't complete the action in the given time, the node fails and the action is aborted. | ||
+ | |||
+ | |||
+ | ![The enemy behavior with the time limit decorator](quick/ | ||
+ | |||
+ | The BT built for the example does the following when given to an enemy. The BT starts with a repeat node which is followed by a selector, this selector has 2 branches, the first one sets the enemy to chase the player giving it a time to complete the action with the time limit decorator(we have set the time to 5 seconds in this example) if the enemy manages to catch the player withing that time frame, it stays near the player and if the players separates from him the repeat node at the start of the tree will make the enemy continue to chase the player. Otherwise if the enemy doesn' | ||
+ | |||
+ | The Enemy on the scene have already attached the parameters, if they were missing for some chance you have to set the " | ||
+ | |||
+ | To set the Time Limit, go to the node, and in the node tab there is a parameter called " | ||
+ |