This article's documentation is for anything that uses the Source engine. Click here for more information.

env_beverage

From Valve Developer Community
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)
Class hierarchy
CEnvBeverage
CBaseEntity
effects.cpp

env_beverage is a point entity available in all Source Source games. It is a Half-Life Half-Life legacy entity: the beverage vending machine. This entity dispenses soda cans when used.

Note.pngNote:These are not used for the vending machines in Half-Life 2 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.
Additionally, the ItemSoda.Bounce soundscript and associated audio files should also be provided, which plays every time the soda can thinks.
Note.pngNote:In Black Mesa Black Mesa this entity is replaced with env_dispenser.

Keyvalues

The six flavors of soft drinks in Half-Life: Source Half-Life: Source.
Name (targetname) <string>
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

Capacity (health) <integer>
Number of cans in the dispenser. Default 10 (0 is treated as 10).
Beverage Type (beveragetype) <integer choices>
Which skin to use for the spawned can. Vanilla Half-Life: Source skins described below:
  1. "Coca-Cola" - A lime green can with what appears to be half a kiwifruit pictured, labelled "HAI !".
  2. "Sprite" - A brown can with yellow droplets pictured, labelled "GLUB".
  3. "Diet Coke" - A red/blue can with red berries pictured, labelled "GRAPE".
  4. "Orange" - A blue and green can with a lighter blue face pictured, labelled "GUTHRIE".
  5. "Surge" - A dark green can with darker coloured ends, labelled "YUCK".
  6. "Moxie" - A yellow/orange can with a fiery effect, labelled "DANTE".
  7. Random - One of the first 6 skins found in the MDL will be chosen at random.
Note.pngNote:While skin 6 cannot be selected, skins 7 and higher can. Only skins 0-5 will be used by "random", however.

Inputs

Activate
Same as Use. Dispenses a can