Garry's Mod Wiki

Garry's Mod Wiki

  sound.SetActorGender( string modelPath, string gender )

Description

Sets the gender of a specific actor (model). This is a system from base Half-Life 2 - global_actors.txt.

This will affect what voice lines npc_citizen will use when they have the given model set.

It is not limited to npc_citizens - any sound played on any entity with given model can have gender specific sounds playing, including soundscripts, by including $gender token in the sound file path.

Internally the gender is stored by model file name only (i.e. models/alyx.mdl would be stored as alyx), not the full path! Be aware of potential collisions.

Arguments

1 string modelPath
Path to the model file to set the gender of.
2 string gender
Gender to set. Only 2 options are permitted: female and male. Any other option will be ignored.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...