Set permanent action||doc135458

September 20, 2022

Format

 Entity:setAlwaysAction(action) 
  • The class to which the function belongs:Entity

Description

Set the permanent action, when the entity object does not perform the upper action, the permanent action will be played, and the permanent action will replace any actions in other states, such as walking, jumping, swimming, etc.


Precautions

  • You can pass an empty character ('') to cancel the resident action

Parameters

Variable name type Description
action string Action name


Get action name

In the Action List in the Appearance Action List in the Character Editor, you can see all the actions that can be played under the changed character model and their corresponding action names


Code Samples

on the client side of the objectmount script, set the resident action of the entity to run

this:setAlwaysAction('run')