NPC.SetExpression

From GMod Wiki

Revision as of 15:52, 9 January 2011 by Disseminate (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax NPC:SetExpression( String expression )
Description:
Sets the NPC's facial expression.
Returns: Number
In Object: Npc
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=NPC.SetExpression]NPC.SetExpression [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionMakes a citizen scared
Used onNewerServer.png
Code
 
ents.FindByClass( "npc_citizen" )[1]:SetExpression( "scenes/Expressions/citizen_scared_idle_01.vcd" );
 
OutputHis face becomes frightened.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox