Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Creating custom weapons - basics: Difference between revisions

From TF2 Classified Wiki
mNo edit summary
No edit summary
Line 86: Line 86:
: This parameter controls what model's animations are used. If set to 1, the class' c_arms will be used for the animations. If set to 2, the item model's animations will be used instead.
: This parameter controls what model's animations are used. If set to 1, the class' c_arms will be used for the animations. If set to 2, the item model's animations will be used instead.
{{code|preset=3|"used_by_classes"}}
{{code|preset=3|"used_by_classes"}}
: This controls which classes can use the item. {{code|<backpack slot>}} can be set to 1 to use the loadout slot defined under {{code|preset=3|"item_slot"}}, or can be set to a specific loadout slot.
: This controls which classes can use the item. Set to 1 to use the loadout slot defined under {{code|preset=3|"item_slot"}}, or set it to a specific loadout slot to get it to appear in that slot for a specific class.
{{code|preset=3|"attributes"}}
{{code|preset=3|"attributes"}}
: The list of attributes that modify the weapon's behaviour. You can add as many attributes as you'd like, just as long as the attribute class isn't repeated. Some attributes can be condensed into a single line if you wish (e.g. <attribute name> "<value>"), which is helpful for meta-attributes like {{code|"hidden separator"}} and {{code|"provide on active"}} that are repeated often.
: The list of attributes that modify the weapon's behaviour. You can add as many attributes as you'd like, just as long as the attribute class isn't repeated. Some attributes can be condensed into a single line if you wish (e.g. <attribute name> "<value>"), which is helpful for meta-attributes like {{code|"hidden separator"}} and {{code|"provide on active"}} that are repeated often.
{{code|preset=3|"static_attrs"}}
{{code|preset=3|"static_attrs"}}
: A variant of {{code|preset=3|"attributes"}} that should '''only''' be used for attributes like {{code|"min_viewmodel_offset"}}.
: A variant of {{code|preset=3|"attributes"}} that should '''only''' be used for attributes like {{code|"min_viewmodel_offset"}}.
{{code|preset=3|"visuals"}}
: This parameter allows you to change the item's effects, like sounds and tracers. This will be explained in more detail later.
{{code|preset=3|"mouse_pressed_sound"}}
: The sound to play when the item is selected in a loadout grid.
{{code|preset=3|"drop_sound"}}
: The sound to play when the item is selected in a class' loadout screen.


== Adding attributes ==
== Adding attributes ==