Skip to main content

Animator.SetInteger(string name, number value)

Sets the value of the given integer parameter.

Parameters:

NameTypeDescription
namestringThe parameter name.
valuenumberThe new parameter value.

Usage

---@type Animator
local animator;

---@type string
local name;

---@type number
local value;


animator.SetInteger(name, value)

Extra Detail

Use this as a way to trigger transitions between Animator states. One way of using Integers instead of Floats or Booleans is to use it for something that has multiple states, for example directions (turn left, turn right etc.). Each direction could correspond to a number instead of having multiple Booleans that have to be reset each time.