Random Task in AI
Hi all, I want the behavior tree to randomly do one of the tasks below a selector. Don't care which task. My current solution is to randomly Finish Execute with a fail so it goes to the next one. It works but it doesn't feel clean.
Is there a cleaner solution?
asked Jun 15 '17 at 11:47 AM in Blueprint Scripting
You can create a 'Service' and assign a random integer to a blackboard value and then on each task, use 'blackboard condition' decorator to check that integer value. Here, take a look at this very simple setup for a better understanding;
Assign the service value to blackboard value.
Note that in this approach, the selector only picks one random task to execute. Hope it help.
Follow this question
Once you sign in you will be able to subscribe for any updates here