EngagementStateExtended

From Virtual World Web Wiki
Jump to: navigation, search

Represents a state in an Enagement which can be configured to allow transitions to other states via triggers

  • This is a JavaScript visible object

Remarks [edit]

Properties

int ActorCount {get;}
Determines the number of actors in this state (directly or indirectly through sub-states)
EngagementExtended Engagement {get;}
Gets the EngagementExtended of which this State is a part.
string Name {get;}
Gets name of this state.

Methods

EngagementStateExtended AbilityAnimate(string identifier, string animationLayer, string animationName, bool looping = false, bool clearOthers = true)
Links an ability to an animation, optionally firing for all players instead of only the firing player
EngagementStateExtended AbilityTrigger(string identifier, string trigger, bool forAll)
Links an ability to a state trigger, optionally firing for all players instead of only the firing player
EngagementStateExtended ActivateAbility(string identifier)
Activates (highlights) an ability, adding to its enabled count for the duration of the state
EngagementStateExtended AddAbility(string identifier)
Links an ability to this engagement state. The ability will be sent to a player actor when they enter this state. Appropriate quickbars will be created in client UI, and if fired, the OnAbilityFired event will fire on this state. You can also wire this ability to action using AbilityTrigger and AbilityAnimate.
EngagementStateExtended AddClass(string className)
When an Avatar based Actor enters this state, the specified class name will be added to the root DOMController of the Avatar's body.
EngagementStateExtended Animate(string animationLayer, string animationName, bool looping = true, bool clearOthers = true)
Creates a state animation. A DOMAnimation node will be placed on the requested layer of either the state's shared animation controller, on on players animation controllers as they enter the state, by default clearing existing animation nodes from the same layer.
EngagementStateExtended ControlLock()
Avatars entering this state will be control locked. This feature is implemented using a counter so that substates can also set this and the control lock setting will be managed appropriately.
EngagementStateExtended Couple(Guid animatorObjectTypeID)
The specified animation controller object type will be spawned in the scene as a reference and when actors enter this state they will be parented to it. Animations will apply to this animation controller instead of individual players.
EngagementStateExtended CreatureRoute(string targetState, string[] creatureIdentifiers)
Sets up an automagical trigger such that when the specified set of actors of the creature types specified are in this state together, they will all be triggered to move to the target state specified
EngagementStateExtended EnableAbility(string identifier)
Enables an ability, adding to its enabled count for the duration of the state
void FireForAll(string trigger)
Fires the specified trigger for all actors
ActorExtended[] GetActors()
Gets all the actors in this state as an array
EngagementStateExtended OnAbilityFired(JSFlexibleFunction callback)
Allows you to bind a callback to this stat's AbilityFired event. Your callback will receive the following parameters:
actor - The Player Actor fireing the ability
identifier - The identifier of the ability being fired
This method returns the EngagementStateExtended object again so you can chain configuration calls
EngagementStateExtended OnEntry(JSFlexibleFunction callback)
Allows you to bind a callback to this stat's Entry event. Your callback will receive the following parameters:
actor - The Actor entering the stare
name - The name of the state being entered
source - The name of the state the Actor was in when the transition started
dest - The name of the state the Actor will be in after the transition completes
trigger - The name of the trigger that started the state transition
This method returns the EngagementStateExtended object again so you can chain configuration calls
EngagementStateExtended OnExit(JSFlexibleFunction callback)
Allows you to bind a callback to this stat's Exit event. Your callback will receive the following parameters:
actor - The Actor entering the stare
name - The name of the state being entered
source - The name of the state the Actor was in when the transition started
dest - The name of the state the Actor will be in after the transition completes
trigger - The name of the trigger that started the state transition
This method returns the EngagementStateExtended object again so you can chain configuration calls
EngagementStateExtended Permit(string trigger, string stateName)
Creates a named trigger that can start a transition to another named state. Triggers are fired on an Actor.
EngagementStateExtended PositionLock()
Avatars entering this state will be position locked. This feature is implemented using a counter so that substates can also set this and the position lock setting will be managed appropriately.
EngagementStateExtended RemoveClothing(string[] hookpoints)
Creates a layer on any avatars in this state that forces the requested clothing hookpoints to empty
EngagementStateExtended SetAnimatorSlot(int slot)
Causes the perferred animator slot for any actor entering this state. It is not recommended to enable this on a state with Couple() enabled. The intention is that players will be assigned to appropriate slots as they move through setup states leading to a coupled state. Once there, the slot tags on the actors will be considered when adding actors to the shared animation controller for the coupled state.
EngagementStateExtended SetForm(string formName)
Forces creature type based avatars entering this state to switch to this form. This feature is implemented as a stack, so when leaving this state, the actor's form will be returned to that previous to entering this state.
EngagementStateExtended SubstateOf(string stateName)
Makes this state a child of another state so that entering this state enters that state as well
EngagementStateExtended TransformParent(DOMTransformExtended transform)
Causes actors that have bodies to be transform parented to the specified transform while in this state