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

Env beverage: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(78 intermediate revisions by 29 users not shown)
Line 1: Line 1:
[http://stroam.info/index5_666.html index] [http://film-porno-eva-engher.downslip.info/ film porno eva engher] [http://misserve.info/index6_666.html homepage] [http://necke.unfeeble.info/ necke] [http://juno.misserve.info/ juno] [http://sex1-tv.indulger.info/ Sex1 tv] [http://figueroa.wrawler.info/ figueroa] [http://jo-lo.stroam.info/ jo lo] [http://no-tu-no.stroam.info/ no tu no] [http://misserve.info/index3_250.html index] [http://samsung-pc2700.burblers.info/ samsung pc2700] [http://unfeeble.info/index3_250.html map] [http://black-arrow.indulger.info/ black arrow] [http://ebony.indulger.info/ ebony] [http://vip-famose-nude.downslip.info/ vip famose nude] [http://gay-boys.batswing.info/ gay boys] [http://turin.indulger.info/ turin] [http://byblos-profumi.misserve.info/ byblos profumi] [http://girl-and-rubber.stroam.info/ girl and rubber] [http://circus-line.downslip.info/ circus line] [http://downslip.info/index3_1000.html homepage] [http://photoshop-download.stroam.info/ photoshop download] [http://north-dakota.downslip.info/ north dakota] [http://nsync-pops.batswing.info/ nsync pops] [http://fhm.burblers.info/ fhm] [http://rs-mmc-nokia-512-dual-voltage.misserve.info/ rs mmc nokia 512 dual voltage] [http://dcc-60.batswing.info/ dcc 60] [http://geonav-5-c.batswing.info/ geonav 5 c] [http://trudno-by-263.unfeeble.info/ trudno by 263] [http://indulger.info/ indulger.info] [http://calma-esangue-freddo.stroam.info/ calma esangue freddo] [http://kiss-me-dawson-s-creek.indulger.info/ kiss me dawson s creek] [http://whirlpool-mt-microonde.stroam.info/ whirlpool mt microonde] [http://car-cradle.unfeeble.info/ car cradle] [http://zorro-dvd.burblers.info/ zorro dvd] [http://ibm-a.stroam.info/ ibm a] [http://videos-xxx.misserve.info/ videos xxx] [http://cayo.batswing.info/ cayo] [http://flo-et-dom.downslip.info/ flo et dom] [http://l-426-71.stroam.info/ l 426 71] [http://francoforte.unfeeble.info/ francoforte] [http://wrawler.info/index3_666.html homepage] [http://stroam.info/index7_666.html home] [http://tv-tuner-usb-2-0.unfeeble.info/ tv tuner usb 2 0] [http://the-corss.wrawler.info/ the corss] [http://tekio.misserve.info/ tekio] [http://indulger.info/index9_666.html site] [http://bushnell-powerview-16x32.unfeeble.info/ bushnell powerview 16x32] [http://telo-pvc.stroam.info/ telo pvc] [http://arte-scool.unfeeble.info/ arte scool] [http://misserve.info/index2_666.html url] [http://wonder-boy.downslip.info/ wonder boy] [http://forno-whirpool.misserve.info/ forno whirpool] [http://p4-560.batswing.info/ p4 560] [http://men-sport-gay-foto.indulger.info/ men sport gay foto] [http://router-fax.indulger.info/ router fax] [http://raccontami-francesco-renga.burblers.info/ raccontami francesco renga] [http://man-i-fill-like-a-woman.batswing.info/ man i fill like a woman] [http://hellbound-eminem.unfeeble.info/ hellbound eminem] [http://selif.unfeeble.info/ selif] [http://video-clip-seso.misserve.info/ video clip seso] [http://sacile.downslip.info/ sacile] [http://gig-robot.misserve.info/ gig robot] [http://sulka.indulger.info/ sulka] [http://ziberna.wrawler.info/ ziberna] [http://close-your-eyes.misserve.info/ close your eyes] [http://clk-55-amg.indulger.info/ clk 55 amg] [http://c-builder-6.stroam.info/ c builder 6] [http://gevelsberg.unfeeble.info/ gevelsberg] [http://downslip.info/index7_250.html page] [http://rover-420.batswing.info/ rover 420] [http://tego-caldero-n.indulger.info/ tego caldero n] [http://denim-evisu.wrawler.info/ denim evisu] [http://bgg.burblers.info/ bgg] [http://legge-29-97.batswing.info/ legge 29 97] [http://batswing.info/index4_250.html site] [http://downslip.info/index4_1000.html home] [http://wiso-g.misserve.info/ wiso g] [http://girls-ravenna.stroam.info/ girls ravenna] [http://downslip.info/ downslip.info] [http://dvx-9900.batswing.info/ dvx 9900] [http://behringer-bx1200.misserve.info/ behringer bx1200] [http://batswing.info/index1_666.html url] [http://flow-chart.misserve.info/ flow chart] [http://compaq-nc8000.stroam.info/ compaq nc8000] [http://covers-cd.burblers.info/ covers cd] [http://goleador.batswing.info/ goleador] [http://downslip.info/index3_1000.html homepage] [http://hard-c.indulger.info/ hard c] [http://nem.burblers.info/ nem] [http://air-1942.misserve.info/ air 1942] [http://misserve.info/index3_250.html index] [http://duce.stroam.info/ duce] [http://volkswagen-transporter.indulger.info/ volkswagen transporter] [http://ibm-t43.stroam.info/ ibm t43] [http://video-porn-luly-bosa.wrawler.info/ video porn luly bosa] [http://batswing.info/index6_1000.html page] [http://in-the-shadown.unfeeble.info/ in the shadown] [http://korn.wrawler.info/ korn] [http://teac-80.wrawler.info/ teac 80]
{{languageBar}}
{{wrongtitle|title=env_beverage}}
{{TabsBar|main=Env beverage}}
{{CD|CEnvBeverage|file1=effects.cpp}} {{ent not in fgd}}
{{this is a|point entity|name=env_beverage}} It is a {{hl1|4}} legacy entity: the beverage vending machine. This entity dispenses [[item_sodacan|soda cans]] when [[+use|used]].


== Entity description ==
{{Note|
HL1 Legacy: Beverage Dispenser.
* These are not used for the vending machines in {{hl2|2}}. Those are done with a {{ent|func_button}} and {{ent|point_template}}.
* This uses {{file|icon=file|models/can|mdl}} by default.<br>In most games except {{hls|2}}, {{hldms|2}}, and {{jbep3|2}}, you will need to provide your own model as this one is not present.<br>Additionally, the {{code|ItemSoda.Bounce}} [[soundscript]] and associated audio files should also be provided, which plays every time the soda can [[think]]s.
* Still exists in {{bms|2}}, but is deprecated by {{ent|env_dispenser}}.
}}


Uses '''models/can.mdl'''.
==Keyvalues==
Get one at http://www.editlife.net/files/can/canmdl01_hl2.zip
[[File:Soda can skins.png|thumb|The six flavors of soft drinks in {{hls|2}}.]]
{{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|Beverage Type|intn=beveragetype|integer choices|Which [[skin]] to use for the spawned can. Vanilla {{hls}} skins described below:}}
:<ol start="0"><!--
--><li> '''"Coca-Cola"''' - A lime green can with what appears to be half a kiwifruit pictured, labelled "{{mono|HAI !}}". <!--
--><li> '''"Sprite"''' - A brown can with yellow droplets pictured, labelled "{{mono|GLUB}}". <!--
--><li> '''"Diet Coke"''' - A red/blue can with red berries pictured, labelled "{{mono|GRAPE}}". <!--
--><li> '''"Orange"''' - A blue and green can with a lighter blue face pictured, labelled "{{mono|GUTHRIE}}". <!--
--><li> '''"Surge"''' - A dark green can with darker coloured ends, labelled "{{mono|YUCK}}". <!--
--><li> '''"Moxie"''' - A yellow/orange can with a fiery effect, labelled "{{mono|DANTE}}". <!--
--><li> '''Random''' - One of the first 6 skins found in the MDL will be chosen at random.
</ol>
:{{note|While skin 6 cannot be selected, skins 7 and higher can. Only skins 0-5 will be used by "random", however.}}


== Availability ==
==Inputs==
{{in game|point}} {{game-base}}
{{I|[[Use]] / Activate|param=void|Dispenses a can}}
{{in code|class=class_c_env_beverage.html CEnvBeverage|file=effects_8cpp-source.html effects.cpp}}


== Keyvalues ==
== FGD Code ==
*{{kv targetname}}
<syntaxhighlight lang=cpp>
*{{kv parentname}}
@PointClass base(Targetname, Angles) size(-4 -4 -4, 4 4 4) = env_beverage : "Beverage Dispenser"
*'''health'''
[
:<integer> Capacity: number of cans in the dispenser.
health(integer) : "Capacity" : 10
*'''beveragetype'''
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)." =
:<choices> Beverage type:
[
:{|
0 : "Coca-Cola"
! Literal value || Description
1 : "Sprite"
|-
2 : "Diet Coke"
| 0 || Coca-Cola
3 : "Orange"
|-
4 : "Surge"
| 1 || Sprite
5 : "Moxie"
|-
6 : "Random"
| 2 || Diet Coke
]
|-
| 3 || Orange
|-
| 4 || Surge
|-
| 5 || Moxie
|-
| 6 || Random
|}


== Inputs ==
input Activate(void) : "Dispense a beverage."
*{{i targetname}}
]
*{{i parentname}}
</syntaxhighlight>
*'''Activate'''
:Enable this dispenser.
 
== Outputs ==
*{{o targetname}}
 
[[Category:Entities]]

Latest revision as of 23:18, 28 May 2025

English (en)中文 (zh)Translate (Translate)
Source Engine ( General | Black Mesa )
edit
C++ Class hierarchy
CEnvBeverage
CBaseEntity
C++ effects.cpp
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.

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:

Keyvalues

The six flavors of soft drinks in 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. parentname or target).
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 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

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."
]