Env beverage: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
 Note:These are not used for the vending machines in
Note:These are not used for the vending machines in  Half-Life 2. Those are done with a func_button and point_template.
 Half-Life 2. Those are done with a func_button and point_template.
 Note:This uses
Note:This uses 
In most games except Half-Life: Source,
 Half-Life: Source,  Half-Life Deathmatch: Source, and
 Half-Life Deathmatch: Source, and  Jabroni Brawl: Episode 3, you will need to provide your own model as this one is not present.
 Jabroni Brawl: Episode 3, you will need to provide your own model as this one is not present.
Additionally, the
 Note:In
Note:In  Black Mesa this entity is replaced with env_dispenser.
 Black Mesa this entity is replaced with env_dispenser.
 
  
		
	
| SirYodaJedi (talk | contribs) m (→FGD Code) | SirYodaJedi (talk | contribs)   (→Keyvalues:  forgot angles. Yes, the usage of a different word for soda each time is deliberate) | ||
| Line 10: | Line 10: | ||
| [[File:Soda can skins.png|thumb|The six flavors of soft drinks in {{hls|2}}.]] | [[File:Soda can skins.png|thumb|The six flavors of soft drinks in {{hls|2}}.]] | ||
| {{KV Targetname}} | {{KV Targetname}} | ||
| {{KV|Pitch Yaw Roll (Y Z X)|intn=angles|QAngle|Which direction to dispense the pop.}} | |||
| {{KV|Capacity|intn=health|integer|Number of cans in the dispenser. Default 10 (0 is treated as 10).}} | {{KV|Capacity|intn=health|integer|Number of cans in the dispenser. Default 10 (0 is treated as 10).}} | ||
| {{KV|Beverage Type|intn=beveragetype|integer choices|Which [[skin]] to use for the spawned can. Vanilla {{hls}} skins described below:}} | {{KV|Beverage Type|intn=beveragetype|integer choices|Which [[skin]] to use for the spawned can. Vanilla {{hls}} skins described below:}} | ||
Revision as of 11:38, 16 May 2025
|  Class hierarchy | 
|---|
| CEnvBeverage | 
|  effects.cpp | 
env_beverage  is a   point entity  available in all  Source games. It is a
 Source games. It is a  Half-Life legacy entity: the beverage vending machine. This entity dispenses soda cans when used.
 Half-Life legacy entity: the beverage vending machine. This entity dispenses soda cans when used.
 Note:These are not used for the vending machines in
Note:These are not used for the vending machines in  Half-Life 2. Those are done with a func_button and point_template.
 Half-Life 2. Those are done with a func_button and point_template. Note:This uses
Note:This uses 
models/can.mdl by default.In most games except
 Half-Life: Source,
 Half-Life: Source,  Half-Life Deathmatch: Source, and
 Half-Life Deathmatch: Source, and  Jabroni Brawl: Episode 3, you will need to provide your own model as this one is not present.
 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:In
Note:In  Black Mesa this entity is replaced with env_dispenser.
 Black Mesa this entity is replaced with env_dispenser.Keyvalues
 
  The six flavors of soft drinks in  Half-Life: Source.
 Half-Life: Source.
 Half-Life: Source.
 Half-Life: Source.- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- Which direction to dispense the pop.
- 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  skins described below: skins described below:
- "Coca-Cola" - A lime green can with what appears to be half a kiwifruit pictured, labelled "HAI !".
- "Sprite" - A brown can with yellow droplets pictured, labelled "GLUB".
- "Diet Coke" - A red/blue can with red berries pictured, labelled "GRAPE".
- "Orange" - A blue and green can with a lighter blue face pictured, labelled "GUTHRIE".
- "Surge" - A dark green can with darker coloured ends, labelled "YUCK".
- "Moxie" - A yellow/orange can with a fiery effect, labelled "DANTE".
- Random - One of the first 6 skins found in the MDL will be chosen at random.
 
 Note:While skin 6 cannot be selected, skins 7 and higher can. Only skins 0-5 will be used by "random", however. Note:While skin 6 cannot be selected, skins 7 and higher can. Only skins 0-5 will be used by "random", however.
Inputs
- Use / Activate <void>
- Dispenses a can
FGD Code
@PointClass base(Targetname, Angles) size(-4 -4 -4, 4 4 4) = env_beverage : "Beverage Dispenser"
[
	health(integer) : "Capacity" : 10
	beveragetype(choices) : "Beverage Type" : 0 : "Which skin to spawn. Skins 7 and higher can also be chosen, but only skins 0-5 will be used when set to 6 (random)." = 
	[
		0 : "Coca-Cola"
		1 : "Sprite"
		2 : "Diet Coke"
		3 : "Orange"
		4 : "Surge"
		5 : "Moxie"
		6 : "Random"
	]
	input Activate(void) : "Dispense a beverage."
]



























