A brain for use with the BrainManager that overrides its owner Entity’s visual settings.
Usually an entity plays the animation associated with its state, if available. For instance, while in the Walk state, the walk animation in the Entity’s visual profile would be played.
This Brain allows you to force a specific animation to be played, regardless of what is going on with the AI.
Currently this only supports setting a single animation by name, but later it should allow you to set animation “sets” (to handle different directions) and animations from different visual profiles.
force_anim | Forces this animation to be played and causes the AI system to stop changing it. |
force_set | Forces this visual set to be played. One of the C_VISUAL_STATE defines from setup_constants.lua. |
Usage:ual
this:GetBrainManager():Add("ForceVisual", "force_anim=climb"); //look like we're climbing, using the "climb" anim in our visual profile.
this:GetBrainManager():Add("ForceVisual", "force_set=" .. C_VISUAL_STATE_JUMP ); //look like we're jumping, supporting different anims for each direction