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
  • Public Variables
  • public List<State> states;
  • public List<Mode> modes;
  • public List<Stance> Stances;
  • public List<EnterExitEvent> OnEnterExitStates;
  • public List<EnterExitEvent> OnEnterExitStances;
  • public StateID OverrideStartState;
  • public FloatReference AnimatorSpeed
  • Properties
  • public static List<MAnimal> Animals
  • public static MAnimal MainAnimal
  • public State LastState {get}
  • public State ActiveState {get}
  • public StateID ActiveStateID {get}
  • public bool AlwaysForward {get set}
  • public bool UseCameraInput {get set}
  • public bool UseCameraUp {get set}
  • General Methods
  • void SetMainPlayer()
  • void DisableMainPlayer()
  • void Teleport(Transform newPos)
  • void Teleport(Vector3 newPos)
  • void TeleportRot(Transform newPos)
  • void ResetGravityDirection()
  • void GroundChangesGravity(bool value)
  • Stance Methods
  • void Stance_Toggle(int NewStance)
  • void StanceToggle(StanceID NewStance)
  • void Stance_Set(int ID) || void Stance_Set(StanceID ID)
  • void Stance_RestoreDefault()
  • void Stance_SetDefault(StanceID id)
  • void GroundChangesGravity(bool value)
  • State Methods
  • void State_SetFloat(float value)
  • void State_Replace(State NewState)
  • void State_Force(StateID ID) || void State_Force(int ID)
  • bool HasState(StateID ID) || bool HasState(int ID)
  • void State_SetStatus(int status)
  • void State_Enable(StateID ID) || void State_Enable(int ID)
  • void State_Disable(StateID ID) || void State_Disable(int ID)
  • State_AllowExit(StateID ID)
  • State_InputTrue(StateID ID)
  • State_InputFalse(StateID ID)
  • void State_Activate(StateID ID)
  • State_TryActivate(int ID)
  • State State_Get(int ID) || State State_Get(StateID ID)
  • Mode Methods
  • Mode Mode_Get(ModeID ModeID) || Mode Mode_Get(int ModeID)
  • void Mode_Activate(ModeID ModeID)
  • void Mode_Activate(ModeID ID, int AbilityIndex)
  • void Mode_Activate(Int ID, int AbilityIndex)
  • bool Mode_TryActivate(int ModeID, int AbilityIndex)
  • void Mode_Activate(Int Combined)
  • void Mode_Stop()
  • void Mode_Interrupt()
  • void Mode_Pin(ModeID ID)
  • void Mode_Pin_Ability(int AbilityIndex)
  • void Mode_Pin_Status(int status)
  • void Mode_Pin_Time(float time)
  • void Mode_Pin_Input(bool input)
  • void Mode_Pin_Activate()
  • void Mode_Pin_AbilityActivate(int AbilityIndex)
  • Speed Methods
  • void SetSprint(bool value)
  • void Speed_Change_Lock(bool value)
  • void Speed_CurrentIndex_Set(int index)
  • MSpeed Speed_GetModifier(string set, int index)
  • void Speed_SetTopIndex(int index)
  • void Speed_SetTopIndex(string setname ,int index)
  • void SpeedSet_Set_Active(string setName, string activeSpeed)
  • void SpeedDown()
  • void SpeedUp()

Was this helpful?

  1. Main Components
  2. MAnimal Controller

Methods and Properties

Public Methods and Properties you can use via script and Unity Events.

PreviousAnimal Animator BehaviorsNextMalbers Input & MInput

Last updated 1 year ago

Was this helpful?

If you are using visual studio the best way to see all the methods, properties and variables is to use the Object Browser:

Below is a list of the most commonly used variables and methods - use the above method in the video to view ALL of the available variables and methods in Animal Controller and HAP!

Public Variables

public List<State> states;

List of the States of the animal. Locomotion, Idle, Fall etc

public List<Mode> modes;

List of the Modes of the animal. Attack, Actions, Hits etc

public List<Stance> Stances;

List of the Stances of the animal. Sneak,Crouch, Alert, Wounded etc

public List<EnterExitEvent> OnEnterExitStates;

List of Events to used on the States. Invoked when a State Enters or Exit.

public List<EnterExitEvent> OnEnterExitStances;

List of Events to Use on when entering on exiting a Stance. Invoked when a StanceEnters or Exit.

public StateID OverrideStartState;

public FloatReference AnimatorSpeed

Global Animator Speed for the Animal in FloatReference type. Use it to change the speed of the Animator.

Properties

public static List<MAnimal> Animals

Returns a list of all the active animals on the scene

public static MAnimal MainAnimal

Returns the Animal that has the Player parameter set to true

public State LastState {get}

Return the Last state the animal played

public State ActiveState {get}

Return the Current State the animal is

public StateID ActiveStateID {get}

Return the Current State ID the animal is

public bool AlwaysForward {get set}

The animal will always move forward

public bool UseCameraInput {get set}

The Animal uses the Camera Forward Direction to Move

public bool UseCameraUp {get set}

Use the Camera Up Vector to Move while Flying or Swimming Underwater (When Grounded = false)

General Methods

void SetMainPlayer()

Set an Animal as the Main Player and set to false the current Player Animal, if it were one.

void DisableMainPlayer()

Disables the animal as the Main Player in case it was.

void Teleport(Transform newPos)

Teleports the Animal to a new position using a transform as a reference

void Teleport(Vector3 newPos)

Teleports the Animal to a new position using a vector position

void TeleportRot(Transform newPos)

Teleports the Animal to a new position using a transform as a reference and also orients the animal to the Transform reference rotation

void ResetGravityDirection()

Resets the gravity to the default Vector.Down value

void GroundChangesGravity(bool value)

If the value is true, the ground negative Normal will be the Gravity Direction

Stance Methods

void Stance_Toggle(int NewStance)

Toggle the New Stance with the Default Stance using and Int ID. If the active Stance is the same, then it will activate the default Stance

void StanceToggle(StanceID NewStance)

void Stance_Set(int ID) || void Stance_Set(StanceID ID)

Set a new Stance using the ID Value.

void Stance_RestoreDefault()

Restore the Default Stance to its original value.

void Stance_SetDefault(StanceID id)

Changes the value of the Default Stance.

void GroundChangesGravity(bool value)

If the is true, the ground negative Normal will be the Gravity Direction

State Methods

void State_SetFloat(float value)

Set the StateFloat value and pass it to the StateFloat parameter on the Animator

void State_Replace(State NewState)

Find an old State and replace it for a new one at Runtime

void State_Force(StateID ID) || void State_Force(int ID)

Force the Activation of an state regarding if is enable or not

bool HasState(StateID ID) || bool HasState(int ID)

Returns if the Animal has a state by its ID

void State_SetStatus(int status)

Set the StateStatus value and pass it to the StateStatus parameter on the Animator

void State_Enable(StateID ID) || void State_Enable(int ID)

Enable a State by its ID

void State_Disable(StateID ID) || void State_Disable(int ID)

Disable a State by its ID

State_AllowExit(StateID ID)

Allow Lower States on the states list to be activated

State_InputTrue(StateID ID)

Find a State by its ID and set its Input value to true

State_InputFalse(StateID ID)

Find a State by its ID and set its Input value to false

void State_Activate(StateID ID)

Activates an State by its ID. If the State is Disabled it won't be activated

State_TryActivate(int ID)

Try to Activate a State by its ID, Checking the necessary conditions for activation

State State_Get(int ID) || State State_Get(StateID ID)

Return a State by its ID value

Mode Methods

Mode Mode_Get(ModeID ModeID) || Mode Mode_Get(int ModeID)

Returns a Mode using its ID value.

void Mode_Activate(ModeID ModeID)

Activates a mode using its ID value and plays a Random Animation

void Mode_Activate(ModeID ID, int AbilityIndex)

Activates a mode using its ID value and plays an specific Ability by its Index

void Mode_Activate(Int ID, int AbilityIndex)

Activates a mode using its ID integer value and plays an specific Ability by its Index

bool Mode_TryActivate(int ModeID, int AbilityIndex)

Tries to activate a mode by checking all the conditions to activate a mode. Returns true if success and false if it could not activated

void Mode_Activate(Int Combined)

This is a special way to activate a mode and an ability all at once.

E.g. To Activate any Action Mode simply call Mode_Activate(4).

But if you want to play an specific Ability inside the Action mode, E.g. Sleep; call instead Mode_Activate(4006) which is the Mode ID (4)*1000 + Ability Index(6).

void Mode_Stop()

Stop All Modes

void Mode_Interrupt()

Set IntID to -2 to exit the playing Mode Animation. IntID = -2 is the Interrupt Condition for all modes

void Mode_Pin(ModeID ID)

Pin a mode to activate later. Store the Mode in the Pin_Mode variable

void Mode_Pin_Ability(int AbilityIndex)

Pin an Ability on the Pin_Mode to Activate later

void Mode_Pin_Status(int status)

Changes the Pin_Mode Status

void Mode_Pin_Time(float time)

Changes the Pin_Mode time when using Hold by time Status

void Mode_Pin_Input(bool input)

Changes the Input Value of the Pin_Mode

void Mode_Pin_Activate()

Tries to Activate the Pin_Mode

void Mode_Pin_AbilityActivate(int AbilityIndex)

Tries to Activate the Pin Mode with an Ability

Speed Methods

void SetSprint(bool value)

Enable/Disable sprinting on the animal

void Speed_Change_Lock(bool value)

Lock speed changes on the animal. Disable changing from walk to run..etc

void Speed_CurrentIndex_Set(int index)

Set an specific speed on the currentSpeedModifier set

E.g. if the animal is using the SpeedSet "Ground" it will change the current speed modifier inside that set (Walk,Run) using an index

MSpeed Speed_GetModifier(string set, int index)

Returns a speed modifier, using the name of the set and an index.

E.g. MAnimal.Speed_GetModifier("Ground",1) will return the Walk SpeedModifier

void Speed_SetTopIndex(int index)

Change the Top Index of a Speed Set.

void Speed_SetTopIndex(string setname ,int index)

Change the Top Index of a Speed Set using the setname

void SpeedSet_Set_Active(string setName, string activeSpeed)

Change the Speed of a Speed Set

void SpeedDown()

Changes to the previous speed on the current speed set modifier

void SpeedUp()

Changes to the next speed on the current speed set modifier

Use this method toof the Animal. Use it if you need the Character to be on a different state On Enabled.

Toggle the New Stance with the Default Stance using and

🐺
override the starting state
StanceID