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
 
(80 intermediate revisions by 30 users not shown)
Line 1: Line 1:
[http://bigliettodaugurio.behav.info/ biglietto d augurio diddl] [http://papesatan.alient.info/ pape satan] [http://handsomefamily.wedged.info/ handsome family] [http://seraorme.enlard.info/ sera orme] [http://lecronachedi.behav.info/ le  cronache  di  narnia] [http://hisx800gt.behav.info/ his x800 gt] [http://annodomini.demogen.info/ anno domini] [http://coolwater.demogen.info/ cool water] [http://evarobinsnuda.behav.info/ eva robins nuda] [http://notebook34ghz.enlard.info/ notebook 3 4 ghz] [http://passatvariant.demogen.info/ passat variant 2003] [http://ibmxseries206.etotest.info/ ibm xseries 206 server] [http://canzoniallaradio.wedged.info/ canzoni alla radio] [http://arthroleptis.etotest.info/ arthroleptis] [http://derneger.etotest.info/ der neger] [http://enermaxeg465ax-veg.etotest.info/ enermax eg465ax-veg] [http://agpgeforce6600.wedged.info/ agp geforce 6600 gt] [http://naturists.wedged.info/ naturists] [http://cyber-shott5.etotest.info/ cyber-shot t5] [http://frontlinecani.demogen.info/ frontline cani] [http://piscinagabbiano.demogen.info/ piscina gabbiano limbiate] [http://generatorihonda.wedged.info/ generatori honda] [http://lgtvplasma42.etotest.info/ lg tv plasma 42] [http://auricolarebluetooth.alient.info/ auricolare bluetooth per qtek] [http://vaiodesktop.skains.info/ vaio desktop] [http://tesiscaricare.demogen.info/ tesi scaricare] [http://eaglepack.wedged.info/ eagle pack] [http://wwwclarececom.wedged.info/ www clarece com] [http://litzharley.wedged.info/ litz harley] [http://epsontonernero1100.wedged.info/ epson toner nero 1100] [http://sparateavista.demogen.info/ sparate a vista] [http://fermopostarivista.etotest.info/ fermoposta rivista] [http://williedynamite.enlard.info/ willie dynamite] [http://carotone.behav.info/ carotone] [http://cariddi.wedged.info/ cariddi] [http://elvideodekalimba.behav.info/ el video de kalimba] [http://ministerodellistruzione.alient.info/ ministero dell istruzione] [http://ritornailterzo.demogen.info/ ritorna il terzo uomo] [http://trivialp.wedged.info/ trivial p] [http://aquiterme.demogen.info/ aquiterme] [http://lettoremp3duo.demogen.info/ lettore mp3 duo 128] [http://federconsumatori.etotest.info/ federconsumatori] [http://kenwoodipood.alient.info/ kenwood ipood] [http://acermonitor17.skains.info/ acer monitor 17] [http://peugeot10613.demogen.info/ peugeot 106 13] [http://ringtonesinreggaeton.skains.info/ ringtones in reggaeton] [http://diegotorresunplagged.enlard.info/ diego torres unplagged] [http://myfirstsexteacher.wedged.info/ my first sex teacher] [http://nokiapresenta.demogen.info/ nokia presenta pathway to glory] [http://laserprint2000.etotest.info/ laser print 2000 srl] [http://nastroepsondfx.alient.info/ nastro epson dfx 5000] [http://blackanp.enlard.info/ black an p] [http://unitalsi.alient.info/ unitalsi] [http://storiatradimento.behav.info/ storia tradimento] [http://giorgiapalmassu.wedged.info/ giorgia palmas su gq] [http://sessouomini.enlard.info/ sesso uomini] [http://haiducidragostea.wedged.info/ haiduci dragostea din tie] [http://wwwactionstar.etotest.info/ www actionstar com] [http://wwesmackdown.alient.info/ wwe smackdown] [http://mercedesbrignone.behav.info/ mercedes brignone] [http://m-audiokeystation.enlard.info/ m-audio keystation 61] [http://finanziamenti.demogen.info/ finanziamenti mini] [http://libriperregali.demogen.info/ libri per regali] [http://hifiroadstar.enlard.info/ hifi roadstar] [http://corsojava.wedged.info/ corso java] [http://nissanbologna.demogen.info/ nissan bologna] [http://motoautodromo.alient.info/ moto autodromo del mugello] [http://ilfilmdelmese.enlard.info/ il film del mese] [http://scameforniindustriali.behav.info/ scame forni industriali spa] [http://campaniameteo.demogen.info/ campaniameteo] [http://mutuotassofisso.demogen.info/ mutuo tasso fisso] [http://danslapeaude.demogen.info/ dans la peau de ma mere] [http://miniappartamenti.behav.info/ mini appartamenti in montagna] [http://vernasca.skains.info/ vernasca] [http://youngneil.alient.info/ young neil] [http://figcveneto.etotest.info/ figc veneto] [http://autoclave.behav.info/ autoclave] [http://xd-picturecard.behav.info/ xd-picture card 512mb] [http://videosoldatoamericano.skains.info/ video soldato americano] [http://lovew.demogen.info/ lovew] [http://tristezza.enlard.info/ tristezza] [http://hotelcologne.behav.info/ hotel cologne] [http://theengineroom.behav.info/ the engine room] [http://stocks.demogen.info/ stocks] [http://cadash.wedged.info/ cadash] [http://travestitigratis.behav.info/ travestiti gratis] [http://liceoscentifico.alient.info/ liceo scentifico castiglion fiorentino] [http://megacock.behav.info/ mega cock] [http://transcorrendo.demogen.info/ transcorrendo] [http://oreficeriaargenteria.wedged.info/ oreficeria argenteria] [http://nikond.skains.info/ nikon d] [http://wirelessmini.enlard.info/ wireless mini pci] [http://normesociali.alient.info/ norme sociali] [http://furgonemercedes.alient.info/ furgone mercedes] [http://hotelpeschiera.behav.info/ hotel peschiera borromeo] [http://mp3usbvideocamera.etotest.info/ mp3 usb videocamera] [http://tonerhp5550n.enlard.info/ toner hp 5550n] [http://wwwhotmailcompe.skains.info/ www hotmail com pe] [http://fotoditransessuali.alient.info/ foto di transessuali] [http://pumacrosscountry.etotest.info/ puma cross country street]
{{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."
]