# Tasks

The individual **Tasks** are the core components of **Universal Monster's Behavior System**. Every behavior is created from an array of basic **Tasks**. **UM** comes with many types of **Tasks** and, depending on the order they are used and the settings they are configured with, you can create any behavior you can think of.

![](https://2501426749-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbsB8IAdQC_jVeRoJ70%2F-MjFvG8W7xbgaXH96V32%2F-MjFvoyMGgYa28Le74dX%2Fimage.png?alt=media\&token=65b1781f-ae5f-4740-9673-f135259de7aa)

**Data Table Row**: You can store your Tasks in a data table.\
**Task**: The type of Task to be executed.\
**Use Attack Task Info?**: Should the Task use the Task Info of the current Attack?\
**Task Info**: See Task Info section below.\
**Use Task Conditions?**: Should the Task use Task Conditions to determine its result?\
**Task Conditions**: See Task Conditions section below.\
**Use Task Result?**: Should the Task use the finish execute result?\
**Success Result**: See Task Results section below.\
**Fail Result**: See Task Results section below.\
**Use Duration?**: Should the Task use a duration result?\
**Duration Result**: See Task Results section below.

## Task Info

Every **Task** will need to be configured by filling out the **Task Info**.  Basic explanations of each variable can be found below, but each **Task Type** will utilize the **Task Info** differently so the variables used for each type will also be explained in their own section.

![](https://2501426749-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbsB8IAdQC_jVeRoJ70%2F-MiCr1hY3eCZn2f74sX0%2F-MiCrmUUXnfRBHiHuYka%2Fimage.png?alt=media\&token=454f12b8-9fd8-43a1-a297-f6609ed1af73)

**Data Table Row**: You can store your Task Info in a data table.\
**Custom**: Set of arrays to be used within a custom Task Event that is triggered at the start of this task.\
**Actor**: The actor class to search for when using the Find task.\
**Start Sound**: Array of sounds, which one is randomly chosen, to play at the start of this task.\
**Start Sound Delay**: Delay, in seconds, before the start sound is played.\
**End Sound**: Array of sounds, which one is randomly chosen, to play at the end of this task.\
**Animation**: Array of animations, which one is randomly chosen, for an Animation task.\
**Root Motion?**: Should the character "simulate" root motion by using location and rotation curves?\
**Location Curve**: The location curve to use when Root Motion is true.\
**Rotation Curve**: The rotation curve to use when Root Motion is true.\
**Launch Character?**: Should the character launch itself?\
**Launch To Target?**: Should the character launch itself to its target?\
**Min Arc**: Minimum height of arc between 0.0-1.0 where 0.5 is the default medium arc, 1 is up, and 0 is directly toward the target.\
**Max Arc**: Maximum height of arc between 0.0-1.0 where 0.5 is the default medium arc, 1 is up, and 0 is directly toward the target.\
**Min Angle**: Minimum angle relative to the character's forward vector.\
**Max Angle**: Maximum angle relative to the character's forward vector.\
**Angle Offset**: Offset of the random angle chosen between Min Angle and Max Angle.\
**Min Strength**: Minimum power for the character launch.\
**Max Strength**: Maximum power for the character launch.\
**Min Duration**: Minimum duration to wait before triggering the duration result.\
**Max Duration**: Maximum duration to wait before triggering the duration result.\
**Min Distance**: Minimum distance to be used in this task.\
**Max Distance**: Maximum distance to be used in this task.\
**Controller Rotation?**: Should the task enable Use Controller Desired Rotation in the Character Movement Component?\
**Orient Rotation?**: Should the task enable Orient Rotation To Movement in the Character Movement Component?\
**Min Movement Rate**: Minimum percentage of max walk speed for this task.\
**Max Movement Rate**: Maximum percentage of max walk speed for this task.\
**Min Acceptance Radius**: Minimum acceptance radius to determine when the character has reached a location.\
**Max Acceptance Radius**: Maximum acceptance radius to determine when the character has reached a location.\
**Stop On Overlap?**: Should the acceptance radius also add the pawn's radius?\
**Min Reaction Time**: Minimum reaction time to be used in this task.\
**Max Reaction Time**: Maximum reaction time to be used in this task.\
**Face Target?**: Should the character rotate to face the target during this task?\
**Maintain Range?**: Should the character maintain its current attack range during this task?\
**Maneuver?**: Should the character maneuver left/right during this task? (no longer in use)\
**Can Perceive?**: Is the character allowed to perceive new targets during this task?\
**Can Change Target?**: Is the character allowed to change targets during this task?\
**Can Enter Combat?**: Is the character allowed to enter combat during this task?\
**Set Attack?**: Should the character set a new attack at the start of this task?

## Task Conditions

![](https://2501426749-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbsB8IAdQC_jVeRoJ70%2F-MjFvG8W7xbgaXH96V32%2F-MjFxTextnVJcHzphc33%2Fimage.png?alt=media\&token=36be4aba-84d4-42f4-8b81-e6aa5b765b5f)

**Random Chance**: Every behavior interval, determined by Min and Max Reaction Time, has a random chance to trigger the result.\
**Stimulus Conditions**: See Conditions page, link below.\
**Self Conditions**: See Conditions page, link below.\
**Target Conditions**: See Conditions page, link below.\
**Result**: See Task Results section below.

{% content-ref url="../conditions" %}
[conditions](https://slashin8r.gitbook.io/universal-monster/features/conditions)
{% endcontent-ref %}

## Task Results

![](https://2501426749-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MbsB8IAdQC_jVeRoJ70%2F-MjFpgi6gEJRuIziHnX5%2F-MjFqLPR-6r7LnbpKrx_%2Fimage.png?alt=media\&token=b63f8c7c-4783-4720-83cc-5472479e4e9c)

**Change Behavior?**: Should this result in a new behavior?\
**In Combat?**: Should the character be in combat?\
**Clear Target?**: Should the character remove its current target?\
**Behavior**: If Change Behavior is true, a random behavior index is chosen for the next behavior.\
**Task**: A random task index is chosen for the next task of the current behavior.

**Change Behavior** will also trigger **UM** to test which behavior array to use. For instance, if your AI is currently using a **Stimuli Behavior** and you set **Change Behavior** and **In Combat** to true, the AI will then choose a behavior and task in the **Combat Behaviors** array. By default, this is used to transition for perceiving the target to then entering combat with the target. Another example, if your AI is currently using a **Combat Behavior** and your set **Change Behavior** to true and **In Combat** to false, the AI will then choose a behavior and task in the **Stimuli Behaviors** array. This is useful for getting an AI to flee after they have already been fighting, such as fleeing when they are less than 25% health.
