Animal Controller
📥 Integrations📑 Changelog✅Social
  • 🤝Welcome to Malbers Animations Assets
  • 🌐Discover all my Assets
  • 💫What's New
  • 🌀Upcoming assets
  • 📋Changelog
  • ↗️Upcoming Changelog
  • 🛣️Road Map
  • ✍️End User Licence Agreement
  • 🌟Features
  • Improve Performance Tricks
  • 😓Know Limitations so far
  • 📥Downloads
  • QuickStart
    • 📖Guide to use All Malbers Assets with (AC)
    • 🔼Upgrade to URP
    • 🔼Upgrade to HDRP
    • 💔Common Issues
    • 🔔Tips and Tricks
  • Guides and Tutorials
  • 📺YouTube Tutorials
    • 📺Video Tutorials (On Queue)
  • 📱Mobile Setup Guide
    • Mobile Joystick
  • 🧐How to: Animal Controller
    • 🔹Play a Mode while Moving
    • 🔹Create and configure a new mode
    • 🔊Adding Sound Effects
    • 🔹Rebone Mesh Tutorial (Skin Mesh is Missing)
    • 🔹Add Movement with Non RootMotion Animations
    • 🔹Fetch a ball
    • 🔹Set up Timeline
    • 🔹Make Animal flee when see the animal Player
    • 🔹Animal Controller for Humanoids
    • Create a Shootable Weapon From Scratch
    • ⚔️How to Fix weapons offset and values (Bow, Pistol)
    • ✨Add a Effect to the Effect Manager
    • 🕹️Connect Inputs to the Controller
    • Modify the controller with a Stat
    • Use the Modify Stat Component
    • 📡Use a MEvent and MEvent Listeners
    • 💎Change from Faceted to Smooth poly art Animals
    • ⁉️Listen when an Mode starts or ends
  • 🐎How to: Horse Animset Pro
    • 🐴Call the Mount
    • 🤠Change Meshes for the Rider
    • 🏇Make any animal mountable
  • 🕺Strafing
  • Main Components
    • 🐺MAnimal Controller
      • General
        • Pivots
      • Speeds
      • 🔷States
        • 🕴️Idle
        • 🏃‍♂️Locomotion
        • 🌠Fall
        • 🤾‍♀️Basic Jump
        • 🤾‍♂️Root Motion Jump
        • 🐟Swim
        • 🐊UnderWater
        • 🧗‍♂️Climb
        • 🧗‍♂️Ledge Grab
        • 🦅Fly
        • 🪂Glide
        • 🧗Wall Run
        • 🧗Wall Run Vertical
        • ⛷️Slide
        • ☠️Death
        • ☠️Death Ragdoll
        • 🆕Creating a new State
      • 🟩Modes
        • 🟩Mode Behavior
        • 🟩Mode Sequence
      • 🅾️Stances
      • Advanced
      • Animal Modifiers
      • Events
      • Debug
      • Animal Animator Behaviors
      • Methods and Properties
    • 🎮Malbers Input & MInput
      • Methods and Properties
    • 🤖AI
      • AI Animal Control
      • MWayPoint
      • Wander Area
      • AI Target
      • Animal Brain
        • AI States
        • Tasks
          • General - Chance
          • General - Empty
          • General - Invoke Event
          • General - Send Message
          • General - Play Audio
          • General - Quick Align
          • General - Reaction
          • General - Set Look At Aim
          • General - Set Stat
          • General - Wait
          • Animal - Set Speed
          • Animal - Play Mode
          • Animal - Set/Play State
          • Animal - Set Stance
          • Animal - Set Strafe
          • Movement - Move Stop
          • Movement - Patrol
          • Movement - Set Destination
          • Movement - Set Target
          • Variables - Set Var Listener
          • Weapons - Weapon Tasks
        • Decisions
          • General - AND
          • General - Check Stat
          • General - Compare Stats
          • General - Look
          • General - OR
          • General - Is Task Done?
          • General - Wait
          • Movement - Has Arrived
          • Movement - Check Target
          • Animal - Check Mode
          • Animal - Check Stance
          • Animal - Check State
          • Variables - Check Scriptable Variable
          • Variables - Check Transform Var
          • Variables - Check Var Listener
          • Runtime Set - Is Target in Runtime Set
      • 📌Point Click
    • 🧨Reactions
    • 📶Combo Manager
    • ⚔️Weapon Manager
      • 🛡️MWeapon [General] Properties
      • 🛡️MWeapon [Damage] Properties
      • 🛡️MWeapon [IK] Properties
      • ⚔️MMelee
      • 🔫MShooteable
      • 🏹Bow
    • 〰️Path Constraint
      • 〰️MPath
      • 〰️Path Link (Straight)
      • 〰️Path Link (Cinemachine Path)
      • 〰️Path Creator(Sebastian Lague)
    • Speed Ground Changer
  • Scriptable Architecture
    • 💠Scriptables
      • 🔹Bool Var
      • 🔹Int Var
      • 🔹Float Var
      • 🔹String Var
      • 🔹ValueToString
      • 🔢Variable Listeners & Comparers
      • 🔰IDs
      • 🎫Tags
      • 🪝Transform Hook
      • 📣MEvents
      • 📣MEvent Listener
      • 📦Runtime gameobjects
    • 🔤MLocal Variables
  • Secondary Components
    • ⚔️MDamager
      • 🐾MAttack Trigger
      • 🐾Attack Trigger Behavior
      • 🏉MProjectile
      • 🏹Projectile Thrower
      • 🤯MExplosion
    • 🤕MDamageable
    • 🧊Zones
      • Public Methods
    • ✊Pick Up - Drop
    • ✊Pickable
    • 🚩Respawner
    • 🚩Respawner NPC
    • 🚩Simple Respawner
    • 🏁CheckPoint
    • IK Manager
      • IK Processors
      • Weight Processors
  • Global Components
    • 🧡Stats
      • 🔸Stat Modifier
      • 🔸Modify Stat <Component>
      • 🔸Modify Stat <Asset>
      • 👨‍💻Public Methods
    • Animator Behaviours
      • Message Behaviour
      • Random Behaviour
      • Is Kinematic Behaviour
      • Sound Behaviour
      • Rigid Constraint Behaviour
    • 🟩Trigger Proxy
    • 🔌Interactable
    • ⚡Interactor
    • ⁉️Conditions
    • 🎥Free Look Camera
    • 🎥Cinemachine
    • UI
      • Unity Utils
  • Riding System (HAP)
    • Horse Animset Pro (HAP) Riding System
    • The Art of (HAP)
    • Mount
      • Methods and Properties
    • MRider
      • Methods and Properties
    • Mount Triggers
    • Mount Points
  • Utilities
    • Material Changer
    • Active Meshes
    • Effect Manager
    • Effect Behavior
    • Animator Event Sounds
    • Blend Shapes
      • Blend Shape Preset
    • Look At
    • 🏹Aim
    • 🎯Aim Target
    • 🎯Lock On Target
    • 🐾Steps Manager
    • 🐾Step Trigger
    • 🔗Mode Align
    • 🔗Aligner
    • Component Selector
    • MAnimalAnimatorSync
    • Multiple Time Checker
    • MAnimalAnimatorSync
  • Annex
    • 🗃️Integrations
      • General HAP Integration
      • Rewired
      • Invector Templates
        • Invector Weapon Settings
      • Animals Controller + Invector
      • Ootii's Motion Controller
      • Opsive Ultimate Character Controller (UCC 3.03)
      • Opsive Ultimate Character Controller (UCC 3.08) Generic
      • AStar Pathfinding
      • Unity Input System (NEW)
        • New Input Link [Old Versions]
      • Game Creator
      • Game Kit Controller
    • Contact
    • 🤔FAQ
    • Refund Policy
  • Games using Malbers Animations
  • Interfaces
    • IAITarget
    • IWayPoint
    • IAIControl
    • IAim
    • IAlign
    • IGravity
    • IInteractor
  • ULTIMATE SELECTOR
    • Overview
    • Selector Manager
    • Selector Editor
    • Selector Controller
    • Selector Item
    • Selector UI
    • Selector Data
    • Changelog (Selector)
  • 🎒Malbers Inventory Add-On
    • Overview
      • Compatibility Matrix
      • Roadmap
      • Update Notes
  • Updating from v1.1.1 to v1.2 Instructions
  • Basic Setup Instructions
    • Creating a new Item
      • Adding Buffs/Debuffs to Items
      • Setting up Item Reactions
      • Custom Rarities
    • Setting up Item/Inventory Types
    • Set up the Pick/Drop Component
    • Setting up the Notifications
    • Setting up the Item Info panel
  • Inventory Set
    • Events
  • Inventory Master
  • Notification Manager
    • Notification Child
    • Events
  • Save/Load System
  • Item Spawner
  • Storage Chests
    • Chest Inventory
    • Chest Inventory UI
  • Using Armour
  • Shop System
    • Shop
    • Shop UI Manager
  • Cooking System
    • Create a new Recipe
  • UI Manager
  • Hotbar
Powered by GitBook
On this page
  • Check all Mode methods here
  • Overview
  • Adding the Mode to the Animal
  • Abilities
  • Animator
  • Animator Parameters
  • Enter Transition
  • Setting the Transition to an [Animator State Machine]
  • Setting the Transition to an [Animator State]
  • Loop Transition
  • Exit Transitions
  • Interrupt Transition (New Version)
  • Interrupt Transition (Old Version)
  • Exit Transition (Finish Animation)
  • Mode Behaviour
  • Activating a Mode
  • By Input (Mode)
  • By Input (Ability)
  • By Code
  • By Zone
  • By Reaction
  • Parameters
  • Start with Mode
  • Mode List Element
  • General Tab
  • Enable Toggle
  • Input
  • Ignore Lower
  • Has Cool Down
  • Allow Rotation
  • Allow Movement
  • Modifier
  • Source
  • Abilities Tab
  • Active Index
  • Default Index
  • Reset to Default [R]
  • Events Tab
  • On Enter
  • On Exit
  • On Active Ability Index Changed
  • Abilities Override
  • Ability Tab - General
  • Active
  • Input
  • Modifier
  • Additive Position
  • Ignore Grounded
  • Ignore Gravity
  • Persistent
  • Ability Tab - Status
  • Status
  • Ability Tab - Limits
  • Affect States
  • Affect Stances
  • Can Transition from Ability
  • Copy Limits
  • Ability Tab - Audio
  • Audio Clip
  • Audio Source
  • Clip Delay
  • Stop Audio
  • Ability Tab - Events
  • On Ability Enter
  • On Ability Exit

Was this helpful?

  1. Main Components
  2. MAnimal Controller

Modes

✔

PreviousCreating a new StateNextMode Behavior

Last updated 5 months ago

Was this helpful?

Check all Mode methods

Overview

Modes are groups of Animations that can be played on top of the State animations. for example the animal can Attack while running, dodge while flying, get hit while falling, etc.

Adding the Mode to the Animal

To add a new Mode, select the Mode Tab and hit the (+) button on the Mode List, and add an ID value


Abilities

These are the list of animations inside a mode, which are the actual animations to activate on the animal. A Mode is the group that puts together those animations. E.g You can have a Mode called Magic Spells, and all the abilities will be the different spells the character can do: Fireball, ice shards, etc.

You should rename those abilities to the animations you want to play on the animator. The name does not need to match.

Animator

All the Modes are set on the Mode Layer on the Animal Animator Controller:

Animator Parameters

The Mode parameter play modes on the Animator Controller, along with the ModeStatus parameter.

The new Animal Controller from V3.3 onwards uses also the [ModeOn] Trigger Animator Parameter.

Enter Transition

To set properly the Mode Parameters for the Animator Controller the value combined on a single integer value.

E.g.: Mode [Action = 4] and Ability [Born = 14] combined is equal 4014 using this formula:

ModeID∗1000+AbilityModeID*1000 +AbilityModeID∗1000+Ability

Setting the Transition to an [Animator State Machine]

To set an Entering Transition condition for a mode and its animations, the Mode value needs to be set in the correct range for the mode you want. Eg Action:

Action Mode ID= 4. so all the Action Abilities Animations will be between 4000 and 5000.

Inside the Animator State Machine, all the internal conditions will use the formula:Mode=ModeID∗1000+Ability.Mode =ModeID *1000+Ability.Mode=ModeID∗1000+Ability.

Setting the Transition to an [Animator State]

If you want to add the Transition directly to an Animator State, the condition to play the Mode Abilities is the combined Mode-Ability formula.

Loop Transition

Some Mode Animations can loop to themselves, The condition Transition is ModeStatus = -1:

Exit Transitions

For exiting a mode animation you will need 2 Exit Transition (Interrupt) and (Default Exit)

Interrupt Transition (New Version)

The new Interrupt Transition version uses the Mode as exit value.

Its just like the Enter Transition but the condition to exit is Not Equal.

Has Exit Time = false and the condition is Mode != ModeAbilityIndex

Interrupt Transition (Old Version)

  • Has Exit Time = false and the Condition is ModeStatus = -2 (This is the Old way)

Exit Transition (Finish Animation)

Exiting the Mode. Where Has Exit Time = true and there are no Conditions. Set your Exit time and Transition Duration values according to your needs.

Mode Behaviour

All the Animations need to have the Mode Behaviour attached. This allows the Animal Controller to know when a Mode Starts and Stops playing.

Check more info here:

Activating a Mode

There are 4 ways to activate a mode.

By Input (Mode)

All modes have an Input Parameter that you can connect to the Input Component.

Create an Input on the Malbers Input or MInput Component and use the same name as the Input Parameter.

So when you press the Input designated to a Mode. It will play a random Animation Ability from that mode.

By Input (Ability)

If you want to play a specific Ability Inside a Mode. Each Ability has an Input Parameter that can be also connected to the Malbers Input Component:

By Code

By Zone

By Reaction

Parameters

Start with Mode

Plays a Mode at Start.

You can set a ModeID to start with Mode and a Random animation of that mode or you can set a Mode and Ability combined to start with a specific animation on a mode

E.g.: Mode [Action = 4] and Ability [Born = 14] combined is equal 4014 using this formula:

ModeID∗1000+AbilityModeID*1000 +AbilityModeID∗1000+Ability

So setting Start with Mode = 4014 on the Golems will play the Born Animations on Start

Mode List Element

When selecting a mode from the list will show that mode's properties. On the Mode Row, you will see the Active value, ID, and Priority.

General Tab

Enable Toggle

Enable/Disable the Mode

Input

Ignore Lower

If a Mode with lower priority is playing, it will interrupt it and play this mode instead.

Has Cool Down

Elapsed time to be able to play the Mode Again. If it's set to 0, then the Mode cannot be interrupted until it finishes the Animation.

Allow Rotation

Allows turning the animal while is in the Mode

Allow Movement

Allows movement while the animal while is in the Mode when the mode is additive.

E.g. The horse can play the Damage Mode while running by moving only the head.

Modifier

These are snipped of code that can be used to change the behavior of a mode

Source

Audio Source to play all the mode sounds


Abilities Tab

Active Index

Current Active Ability Index of a mode. When is set to 0, it won't play any Ability. If is set to -99 it will play a random ability from the list.

Default Index

When a mode animation finishes playing, the Active Index will change to this value.

Reset to Default [R]

If enabled, when Exiting the Mode the Active Index will reset to the Default Index value

Events Tab

On Enter

Invoked when the Animal enters a Mode

On Exit

Invoked when the Animal exits a Mode

On Active Ability Index Changed

Invoked when the active ability changes

Abilities Override

Ability Tab - General

Active

Enable/Disable the Ability

Input

Unique Input specifically for this ability

Modifier

Local mode modifier to add to the ability. E.g. you can add directional damage abilities that play unique animations here

Additive Position

Multiplier is added to the additive position when the animation is playing. You can increase or remove completely the RootMotion and Additive Position values.

Ignore Grounded

Can ignore if the animal is grounded. Useful for modes that move on the Y Axis. E.g You can use it if you have attacks that will make the animal leave the ground.

Ignore Gravity

Can ignore gravity. Useful if the mode is playing in the air and you dont need gravity affecting the animation.

Persistent

Whilst playing the ability, this will stop any other states attempting to play on top of the mode until it's finished

Ability Tab - Status

Status

  • PlayOne Time: The mode will play until it finishes ability animation.

  • Charged or Hold Input Down: The mode will play until the Input is released, or the charge has finished.

    • Charge Time: Time needed to complete the charge. if is set to zero then the Charge feature will be ignored

    • Charge Value: Multiplier applied to the charge curve.

    • Charge Curve: Curve values applied to the charge value stored in 'ModePower'

    • Release: If the Charge time has passed, then the mode will finish.

  • Active by Time: The Mode will be playing for a given amount of seconds.

  • Toggle: The mode will play when the Input is Down, and it will stop playing when the Input is Down again

  • Forever: The mode will play forever. To stop it call Animal.ModeStop().

Ability Tab - Limits

Affect States

You can either Include or Exclude certain states that this ability is allowed to be played on. E.g. you can allow the character to perform a "Shake Hands" when on the Idle state or the Locomotion state etc.

If is set to Include: the Mode can be activated if the Animal is only on any of the states on the Affect State List.

If is set to Exclude: the Mode cannot be activated if the Animal is on any of the states on the Affect State List.

Affect Stances

You can either Include or Exclude certain stances that this ability is allowed to be played on.

E.g. You can exclude doing attacks if the Wounded stance is active.

Can Transition from Ability

Modes can transitions from other abilities inside the same mode.

E.g Sit can transition to Lie to Sleep:

Copy Limits

Allows you to copy the limits to all other abilities if required.

Ability Tab - Audio

Audio Clip

Which audio clip should be played when the ability is played?

Audio Source

What source should the clip be played from?

Clip Delay

Should there be a delay when playing the clip? If not, set to 0 by default.

Stop Audio

A toggle to allow you to stop the audio on ability end. By default this is set to ON

Ability Tab - Events

On Ability Enter

Invokes when this specific ability starts

On Ability Exit

Invokes when this specific ability exits

You can use all Mode Methods inside the Animal Controller. Check them out

All modes can be played if the character enters a .

All modes can be played if the character uses a .

Store the Input needed to Activate the Mode. It matches the Input from the component

You can override any Ability to get their own , , and / Events. Simply click on the ability to show further details at the bottom.

🐺
🟩
🟩Mode Behavior
here
zone
reaction
Malbers/MInput
Status
Affect States
On Enter
On Exit
here
Use the [ModeOn] Trigger Parameter (If you are using the newer version of the Animator)
Use the [ModeOn] Trigger Parameter (If you are using the newer version of the Animator)
Set your Exit time