(Derived from information published by Steve Tietze)
Here are a few definitions that are commonly found in the Quake-C code defining the behavior of animated models (monsters, players, etc...).
Most of this information is not interpreted by the Quake-C compiler, but it's useful for the program modelgen that generates the models.
$modelname namename is the name of the model file defining the object.
$cd dirSpecify the directory where your model file (.MDL) is located.
$flags rotationThis field is not interpreted by Quake-C, but it's useful for the program modelgen that generates the models.
$origin x y zThis field is not interpreted by Quake-C, but it's useful for the program modelgen that generates the models.
$scale numberThis field is not interpreted by Quake-C, but it's useful for the program modelgen that generates the models.
$base objectThis field is not interpreted by Quake-C, but it's useful for the program modelgen that generates the models.
$skin skinfileThis field is not interpreted by Quake-C, but it's useful for the program modelgen that generates the models.
$frame frame1 frame2 ...This defines several animation frames of the object.
$frame walk1 walk2 walk3 walk4 void() man_walk1 = [ $walk1, man_walk2 ] { ... some code ... }; void() man_walk2 = [ $walk2, man_walk3 ] { ... some code ... }; void() man_walk3 = [ $walk3, man_walk4 ] { ... some code ... }; void() man_walk4 = [ $walk4, man_walk1 ] { ... some code ... };
In the brackets, the first parameter defines the name of the frame (as found in the model file), and the second parameter defined the function that is to be executed in the next frame (by setting the value of self.nextthink).
Most of these functions do nothing special, but some can be very complex (for instance, the functions that are called when the monster tries to see a player).