Description
The SpecialMove
property of the CitizenAnimationHelper
class allows you to set a specific movement state for the model, overriding the default running or walking animations. This can be particularly useful for creating unique character movements in different game scenarios.
For example, you can use the SpecialMove
property to set the character to perform a ledge grab, roll, or slide, depending on the context of your game. This property utilizes the SpecialMoveStyle
enumeration to define the type of special movement.
Usage
To use the SpecialMove
property, assign it a value from the SpecialMoveStyle
enumeration. This will change the character's animation to the specified special move style.
Available SpecialMoveStyle
values include:
LedgeGrab
: Ideal for animations where the character is shimmying across a ledge.
Roll
: Suitable for platformer games where the character is rolling continuously.
Slide
: Useful for shooter games or platformers where the character is sliding.
Example
// Example of setting a special move style for a character
var animationHelper = new CitizenAnimationHelper();
// Set the character to perform a ledge grab
animationHelper.SpecialMove = CitizenAnimationHelper.SpecialMoveStyle.LedgeGrab;
// Set the character to perform a roll
animationHelper.SpecialMove = CitizenAnimationHelper.SpecialMoveStyle.Roll;
// Set the character to perform a slide
animationHelper.SpecialMove = CitizenAnimationHelper.SpecialMoveStyle.Slide;