void OnModeBegin()

robot_2Generated
code_blocksInput

Description

The OnModeBegin method is a virtual method in the MoveMode class, which is part of the Sandbox.Movement namespace. This method is called when a movement mode is initiated, allowing for any necessary setup or initialization specific to the mode being started.

Usage

Override this method in a derived class to implement custom behavior that should occur when the movement mode begins. This could include setting initial parameters, resetting state variables, or triggering animations specific to the mode.

Example

public class CustomMoveMode : MoveMode
{
    public override void OnModeBegin()
    {
        // Custom initialization code for when this move mode begins
        // For example, reset speed or set a specific animation
        base.OnModeBegin();
        // Additional custom logic here
    }
}