Best way to update behavior when another NPC spots the enemy, and how to create a custom score for Utility Selector?

corb555

New member
1) I will have a number of bad bots wandering and looking for good bots (ideally all bad bots running the same Behavior). When they see the enemy I want them to notify all bad bots and have them act on the information. Rough plan attached. When a bot discovers something interesting it will generate an event. I want that bot to ignore the event but other bots to act on it. Is this the right approach for group activity and how do I ignore my own generated event?

2) When the wander exits because something was found I want the bots to create a score for different activities (Pursue, Evade, etc) based on a number of factors (distance, health, weapons, anger level, etc). The Utility Selector seems like the best way. How can I create a score evaluation for each activity (I can calculate the score, just not sure how to integrate it).

BD wander2.png
 
1) I will have a number of bad bots wandering and looking for good bots (ideally all bad bots running the same Behavior). When they see the enemy I want them to notify all bad bots and have them act on the information. Rough plan attached. When a bot discovers something interesting it will generate an event. I want that bot to ignore the event but other bots to act on it. Is this the right approach for group activity and how do I ignore my own generated event?
You should replace the Selector with a Sequence task that has the Both conditional abort set.

2) When the wander exits because something was found I want the bots to create a score for different activities (Pursue, Evade, etc) based on a number of factors (distance, health, weapons, anger level, etc). The Utility Selector seems like the best way. How can I create a score evaluation for each activity (I can calculate the score, just not sure how to integrate it).
You'll want to create a custom Evaluator task that returns a new curve value. This curve value can be returned within the GetUtility method.
 
Top