Env beverage: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Keyvalues: Skin numbers)
m (Undo revision 337012 by SirYodaJedi (talk))
Tag: Undo
Line 10: Line 10:
{{KV|Capacity|intn=health|integer|Number of cans in the dispenser.}}
{{KV|Capacity|intn=health|integer|Number of cans in the dispenser.}}
{{KV|Beverage Type|intn=beveragetype|choices|Type of the cans.
{{KV|Beverage Type|intn=beveragetype|choices|Type of the cans.
:*0: Skin 1: "Coca-Cola"
:*0: Coca-Cola
:*1: Skin 2: "Sprite"
:*1: Sprite
:*2: Skin 3: "Diet Coke"
:*2: Diet Coke
:*3: Skin 4: "Orange"
:*3: Orange
:*4: Skin 5: "Surge"
:*4: Surge
:*5: Skin 6: "Moxie"
:*5: Moxie
:*6: Random}}
:*6: Random}}
{{KV Targetname}}
{{KV Targetname}}

Revision as of 12:26, 10 August 2023

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CEnvBeverage
CBaseEntity
C++ effects.cpp

Template:Entity It is a Half-Life Half-Life legacy entity: the beverage dispenser. This entity dispenses soda cans (item_sodacan) when +used.

These are not used for the dispensers in Half-Life 2. Those are done with a func_button and point_template.

Note.pngNote:This uses 🖿models/can.mdl by default.
In most games except Half-Life: Source Half-Life: Source, Half-Life Deathmatch: Source Half-Life Deathmatch: Source, and Jabroni Brawl: Episode 3 Jabroni Brawl: Episode 3, you will need to provide your own model as this one is not present.

Keyvalues

Capacity (health) <integer>
Number of cans in the dispenser.
Beverage Type (beveragetype) <choices>
Type of the cans.
  • 0: Coca-Cola
  • 1: Sprite
  • 2: Diet Coke
  • 3: Orange
  • 4: Surge
  • 5: Moxie
  • 6: Random
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

Activate
Same as Use. Dispenses a can

/