Animation functions
These Character functions allow you to interact with the Animation Agent for a given character. These are client-side only fuctions.
Contents |
GetAnimInputs
GetAnimInputs(char as NodeRef) as LookupList indexed by String of String
Client Only. This function will return a list of all Animation Agent Inputs and their values as a LookupList.
This example prints all inputs and their values for your character:
inputs as LookupList indexed by String of String inputs = GetAnimInputs(SYSTEM.INFO.PLAYERCHARACTER) println("inputs:") foreach i in inputs println(i + " = " + inputs[i]) .
GetAnimInput
GetAnimInput(char as NodeRef, name as String) as String
Client Only. Retrieves the Animation Agent Input value for a given input.
Example:
if GetAnimInput(actor, "BasePosture") == "Moving" ... .
GetAnimKnobs
GetAnimKnobs(char as NodeRef) as LookupList indexed by String of String
Client Only. This function will return a list of all Animation Sequence Knobs and their values as a LookupList.
This example prints all knobs and their values for your character:
knobs as LookupList indexed by String of String knobs = GetAnimKnobs(SYSTEM.INFO.PLAYERCHARACTER) println("knobs:") foreach k in knobs println(k + " = " + knobs[k]) .
DoesAnimStringKnobExist
DoesAnimStringKnobExist(char as NodeRef, name as String) as Boolean
Client Only. Determines if the character has a particular Animation Sequence String Knob (sknob) already set or not. Recall that asking for a particular sknob value with the GetAnimStringKnob
function will add the knob automatically if it doesn't exist, so this is the only way to determine if it already exists on the character.
Example:
if DoesAnimStringKnobExist(actor, "WeaponHand") == true ... .
DoesAnimFloatKnobExist
DoesAnimFloatKnobExist(char as NodeRef, name as String) as Boolean
Client Only. Determines if the character has a particular Animation Sequence Float Knob (fknob) already set or not. Recall that asking for a particular fknob value with the GetAnimFloatKnob
function will add the knob automatically if it doesn't exist, so this is the only way to determine if it already exists on the character.
Example:
if DoesAnimFloatKnobExist(actor, "HealthBlend") == true ... .
GetAnimStringKnob
GetAnimStringKnob(char as NodeRef, name as String) as Boolean
Client Only. Retrieves the Animation Sequence String Knob (sknob) value for a given sknob. Note that if the string knob does not exist, it will be added and initilized with a blank string value.
Example:
if GetAnimStringKnob(actor, "WeaponHand") == "Right" ... .
GetAnimFloatKnob
GetAnimFloatKnob(char as NodeRef, name as String) as Float
Client Only. Retrieves the Animation Sequence Float Knob (fknob) value for a given fknob. Note that if the float knob does not exist, it will be added and initilized with a blank string value.
Example:
if GetAnimFloatKnob(actor, "HealthBlend") > .5 ... .