$bodygrouppreset: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added the page to a category)
m (Fixed name of page in QC category. Action performed by bot)
Line 43: Line 43:
*[[$body]]
*[[$body]]


[[Category:QC Commands]]
[[Category:QC Commands|bodygrouppreset]]

Revision as of 10:14, 27 April 2024

$bodygrouppreset is a QC command found in Counter-Strike: Global OffensiveCounter-Strike: Global Offensive. It creates a bodygroup "preset", which when selected will toggle the state of multiple bodygroups at once. It is used to toggle silencers for the M4A1-S and USP-S, and magazines for many other weapons.

Syntax

$bodygrouppreset <preset name> {
   <bodygroup name> <bodygroup index>
   <bodygroup name> <bodygroup index>
   ...
}

The bodygroup index is the body in the bodygroup that you want to be selected in the preset.

Example

$bodygroup glasses {
   blank
   studio "glasses.smd"
}
$bodygroup hats {
   blank
   studio "tophatt.smd"
   studio "fedora.smd"
   studio "towering_pillar_of_hats.smd"
}
$bodygroup cigar {
   blank
   studio "cigar.dmx"
}
$bodygrouppreset "glasses_fedora_nocigar" {
   "glasses" 1
   "hats" 2
   "cigar" 0
}

This will create a bodygroup preset that, when set, will hide the cigar, set the hat to a fedora, and make the glasses visible.

See also