Template:BasicCSseriesWeapon: Difference between revisions
Jump to navigation
Jump to search
Note:This is a template for weapons that exist in both
and
because Template:BasicCSSweapon and Template:BasicCSGOweapon are not accurate for them. This here is literally a mix of both.
Note:Content moved to Rendering and studio model related KIO/Keyvalues for continuation of page history
Note:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history
Note:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history
m (Categories) |
(Used newer KV, I templates. Put Keyvalues and Inputs in a ScrollBox each.) |
||
Line 1: | Line 1: | ||
{{note|This is a template for weapons that exist in both {{css}} and {{csgo}} because [[Template:BasicCSSweapon]] and [[Template:BasicCSGOweapon]] are not accurate for them. This here is literally a mix of both.}} | {{note|This is a template for weapons that exist in both {{css}} and {{csgo}} because [[Template:BasicCSSweapon]] and [[Template:BasicCSGOweapon]] are not accurate for them. This here is literally a mix of both.}} | ||
<onlyinclude> | |||
< | |||
==Keyvalues== | ==Keyvalues== | ||
{{ScrollBox|bottom-border=1|color=#222|style=border:solid 1px; border-color:#444; padding:1em; width:85%| | |||
{{KV|only={{css}}|ammo|integer|Amount of reserve ammo to be added. Fallback value is 0. {{Not in FGD}}}} | {{KV|only={{css}}|ammo|integer|Amount of reserve ammo to be added. Fallback value is 0. {{Not in FGD}}}} | ||
{{KV|only={{csgo}}|Is this weapon allowed to be picked up?|intn=CanBePickedUp|boolean|Determines if players are able to pick up the weapon.}} | {{KV|only={{csgo}}|Is this weapon allowed to be picked up?|intn=CanBePickedUp|boolean|Determines if players are able to pick up the weapon.}} | ||
{{KV | {{KV BaseEntity|noscroll=1}} | ||
{{KV | {{KV BaseAnimating|noscroll=1}} | ||
}} | |||
==Flags== | ==Flags== | ||
Line 15: | Line 15: | ||
==Inputs== | ==Inputs== | ||
{{IO|only={{csgo}}|SetAmmoAmount|param=integer|Sets the | {{ScrollBox|bottom-border=1|color=#222|style=border:solid 1px; border-color:#444; padding:1em; width:85%| | ||
{{IO|only={{csgo}}|SetAmmoAmount|param=integer|Sets the primary ammo which is usually the number of bullets in the active magazine. Every value behaves like its [https://en.wikipedia.org/wiki/Congruence_(integers)#Congruence congruent] value in the range 0-255 in modulus 256 (e.g. -255 and 257 behave like 1 etc.). When set to 0, a player holding this weapon will reload automatically, if possible. Other values congruent to 0 (-256, 256, 512, ...) might cause undefined behavior. Values congruent to -1 (mod 256) make the ammo numbers disappear. If set to a value outside the weapon's clip size, reloading might deliver unexpected results. Grenades use the reserve ammo, not this.}} | |||
{{IO|only={{csgo}}|SetReserveAmmoAmount|param=integer|Sets the reserve (secondary) ammo which is usually the number of bullets in reserve for reloading. Values that are greater than the weapon's reserve ammo limit are clamped to it (e.g. 90 for the [[weapon_ak47]]). Negative values make the ammo display disappear and reloading is impossible.}} | {{IO|only={{csgo}}|SetReserveAmmoAmount|param=integer|Sets the reserve (secondary) ammo which is usually the number of bullets in reserve for reloading. Values that are greater than the weapon's reserve ammo limit are clamped to it (e.g. 90 for the [[weapon_ak47]]). Negative values make the ammo display disappear and reloading is impossible.}} | ||
{{IO|only={{csgo}}|ToggleCanBePickedUp|param=boolean|Toggles | {{IO|only={{csgo}}|ToggleCanBePickedUp|param=boolean|Toggles whether the weapon can be picked up by players. Visually, nothing changes and there is no event if picking up fails. Hover texts like ''"[E] Swap for AK-47"'' remain in both cases.}} | ||
{{I BaseEntity|noscroll=1}} | |||
{{I | {{I BaseAnimating|portal2=1|noscroll=1}} | ||
}} | |||
==Outputs== | ==Outputs== | ||
{{ | {{minititle|Weapon}} | ||
{{IO|OnPlayerUse|Fires when a player [[+use]]s this weapon {{PlAct}}. {{note|{{csgo}} Does not fire if the weapon is picked up successfully.}}}} | {{IO|OnPlayerUse|Fires when a player [[+use]]s this weapon {{PlAct}}. {{note|{{csgo}} Does not fire if the weapon is picked up successfully.}}}} | ||
{{IO|OnPlayerPickup|Fires when a player picks this weapon up {{PlAct}}.}} | {{IO|OnPlayerPickup|Fires when a player picks this weapon up {{PlAct}}.}} | ||
{{IO|OnCacheInteraction|Fires on successful [[+use]] pickup and (rapidly) on player touch {{PlAct}}. {{note|{{csgo}} [[Non-FGD_features|Non-FGD]]. Does not fire if <code>CanBePickedUp</code> is false.}}}} | {{IO|OnCacheInteraction|Fires on successful [[+use]] pickup and (rapidly) on player touch {{PlAct}}. {{note|{{csgo}} [[Non-FGD_features|Non-FGD]]. Does not fire if <code>CanBePickedUp</code> is false.}}}} | ||
{{IO|OnNPCPickup|Fires when an [[NPC]] picks up this weapon {{activator|NPC}}}}. {{note|{{csgo}} [[Non-FGD_features|Non-FGD]]. Bots are considered players, so this output has no functionality.}} | {{IO|OnNPCPickup|Fires when an [[NPC]] picks up this weapon {{activator|NPC}}}}. {{note|{{csgo}} [[Non-FGD_features|Non-FGD]]. Bots are considered players, so this output has no functionality.}} | ||
{{O BaseEntity}} | {{O BaseEntity}} | ||
}} | {{O BaseAnimating}} | ||
<includeonly> | <includeonly> | ||
[[Category:Weapons]] | |||
[[Category:Counter-Strike: Source Entities]] | [[Category:Counter-Strike: Source Entities]] | ||
[[Category:Counter-Strike: Source Weapons]] | [[Category:Counter-Strike: Source Weapons]] | ||
[[Category:Counter-Strike: Global Offensive Entities]] | [[Category:Counter-Strike: Global Offensive Entities]] | ||
[[Category:Counter-Strike: Global Offensive Weapons]] | [[Category:Counter-Strike: Global Offensive Weapons]] | ||
</includeonly> | </includeonly></onlyinclude> |
Revision as of 04:54, 16 January 2022



Keyvalues
- ammo ([todo internal name (i)]) <integer> (only in
)
- Amount of reserve ammo to be added. Fallback value is 0. !FGD
- Is this weapon allowed to be picked up? (CanBePickedUp) <boolean> (only in
)
- Determines if players are able to pick up the weapon.

Flags
- 1 : Start Constrained
- Prevents the model from moving.
Inputs
- SetAmmoAmount <integer> (only in
)
- Sets the primary ammo which is usually the number of bullets in the active magazine. Every value behaves like its congruent value in the range 0-255 in modulus 256 (e.g. -255 and 257 behave like 1 etc.). When set to 0, a player holding this weapon will reload automatically, if possible. Other values congruent to 0 (-256, 256, 512, ...) might cause undefined behavior. Values congruent to -1 (mod 256) make the ammo numbers disappear. If set to a value outside the weapon's clip size, reloading might deliver unexpected results. Grenades use the reserve ammo, not this.
- SetReserveAmmoAmount <integer> (only in
)
- Sets the reserve (secondary) ammo which is usually the number of bullets in reserve for reloading. Values that are greater than the weapon's reserve ammo limit are clamped to it (e.g. 90 for the weapon_ak47). Negative values make the ammo display disappear and reloading is impossible.
- ToggleCanBePickedUp <boolean> (only in
)
- Toggles whether the weapon can be picked up by players. Visually, nothing changes and there is no event if picking up fails. Hover texts like "[E] Swap for AK-47" remain in both cases.

Outputs
Weapon:
- OnPlayerUse
- Fires when a player +uses this weapon (!activator is the player.).
- OnPlayerPickup
- Fires when a player picks this weapon up (!activator is the player.).
- OnCacheInteraction
- Fires on successful +use pickup and (rapidly) on player touch (!activator is the player.).
Note:
Non-FGD. Does not fire if
CanBePickedUp
is false.
- OnNPCPickup
- Fires when an NPC picks up this weapon (!activator is the NPC).
Note:
Non-FGD. Bots are considered players, so this output has no functionality.
