Tf dropped weapon: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (→‎top: clean up, replaced: {{ModernNote| → {{note|)
Line 2: Line 2:


Players can perform a pickup option by performing<code style="color:#E5E5E5;">+use_action_slot_item</code>while looking at this entity, and take the dropped weapon to be used as a player weapon. If the dropped weapon is a medigun then its charge will either slowly drop to 0% or, if the player suicided, set to 0%.
Players can perform a pickup option by performing<code style="color:#E5E5E5;">+use_action_slot_item</code>while looking at this entity, and take the dropped weapon to be used as a player weapon. If the dropped weapon is a medigun then its charge will either slowly drop to 0% or, if the player suicided, set to 0%.
{{ModernNote|Upon picking up a dropped weapon, the original held weapon will not be returned.}}
{{note|Upon picking up a dropped weapon, the original held weapon will not be returned.}}
{{ModernBug|Spawning this entity through {{code|ent_create}} will crash the game if the model KV is set, but not the actual item object.}}
{{ModernBug|Spawning this entity through {{code|ent_create}} will crash the game if the model KV is set, but not the actual item object.}}
{{code class|CTFDroppedWeapon|tf_dropped_weapon.cpp}}
{{code class|CTFDroppedWeapon|tf_dropped_weapon.cpp}}

Revision as of 00:43, 4 January 2024

Template:Entity This entity is used for dropped weapons and will store its weapon information from the player held weapon.

Players can perform a pickup option by performing+use_action_slot_itemwhile looking at this entity, and take the dropped weapon to be used as a player weapon. If the dropped weapon is a medigun then its charge will either slowly drop to 0% or, if the player suicided, set to 0%.

Note.pngNote:Upon picking up a dropped weapon, the original held weapon will not be returned.

Template:ModernBug

C++ In code, it is represented by theCTFDroppedWeaponclass, defined in thetf_dropped_weapon.cppfile.

ConVars/Commands

Cvar/Command Parameters or default value Descriptor Effect
tf_dropped_weapon 30 Arbitrary number (float) Sets the lifetime oftf_dropped_weaponentities.

Keyvalues

Note.pngNote:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history


Inputs

SetTeam <integerRedirectInput/integer>
Changes the entity's team.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history


Outputs

Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history