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
No edit summary
No edit summary
 
(74 intermediate revisions by 28 users not shown)
Line 1: Line 1:
[http://mesotheliomalaywer.com/yg/CSS/data/touch/hjexle.html milk junkies] [http://fishingden.com/wp-content/themes/default/cache/cgxvsp.html sacramento massage therapy classes] [http://mesotheliomalaywer.com/yg/CSS/data/touch/odpbfx.html pissers] [http://mesotheliomalaywer.com/yg/CSS/data/touch/vqxtma.html bachelorette ideas] [http://dagosjokes.com/forum/images/avatars/icons/ppugni.html bargain shopping online] [http://fishingden.com/wp-content/themes/default/cache/ihoaio.html popup display] [http://higherawakening.com/wp-content/themes/default/tmp/obdtct.html butt cum] [http://credit-report-repair.com/yg/CSS/data/cache/nttjlr.html non systemic lupus] [http://nursingtrainingsite.com/blog/wp-content/themes/default/cache/gweeii.html maid of honor speeches] [http://createchemistry.com/yg/CSS/data/cache/hcabbo.html house of the rising sun] [http://freeprovenadvertisingresources.com/wp-content/images/rcrvwj.html all inclusive honeymoons] [http://mesotheliomalaywer.com/yg/CSS/data/touch/bbhijj.html colorado department of motor vehicles] [http://freeprovenadvertisingresources.com/wp-content/images/pohhos.html reflective] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/bewvpw.html rehab] [http://healthyrecipesandmore.com/wp-content/themes/default/cache/pjbpwa.html durable power of attorney] [http://digitalhelp.info/wp-content/themes/default/img/ahdskx.html thoroughbred ownership] [http://persephoneshealinggarden.com/wp-content/themes/contentdesk-3-col/cache/wvuhwp.html associative networks] [http://homeequitysiteonline.com/blog/wp-content/themes/default/cache/bsfcuo.html go fuck yourself] [http://limousinerates.com/atlanta/cache/tmp/henosp.html action action] [http://digitalhelp.info/wp-content/themes/default/img/ucaupc.html hawaiian vacations] [http://limousinerates.com/atlanta/cache/tmp/udrkwc.html xxx gallery gallery pussy cunts stuff] [http://freeprovenadvertisingresources.com/wp-content/images/ijhwva.html penn station] [http://cjboston.com/affiliatereport/wp-content/themes/classic/images/iwjrvs.html safety sign co] [http://freeseotips.com/wp-content/themes/classic/cache/vdtssb.html full sex movies] [http://highwayspace.com/wp-content/themes/default/tmp/jwsojv.html wedding sex] [http://nursingtrainingsite.com/blog/wp-content/themes/default/cache/iqcueh.html redakcija] [http://homeequitysiteonline.com/blog/wp-content/themes/default/cache/hhnqdt.html suicide prevention] [http://hypnotherapymarketingassociation.com/searchlibrary/CSS/data/tmp/ewvlni.html ultrasonic] [http://lilysmomsez.com/wp-content/themes/default/cache/mcoqht.html k9 advantix] [http://memoriesportal.com/wp-content/themes/default/cache/eborem.html black babe] [http://mesotheliomalaywer.com/yg/CSS/data/touch/dkvjaq.html brides maids dresses] [http://contentwebz.com/whmap/inc/languages/german/sttebg.html variable mortgage rates] [http://createchemistry.com/yg/CSS/data/cache/bewapt.html cute brunette] [http://healthyrecipesandmore.com/wp-content/themes/default/cache/gbtphw.html jessica simpson sucking dick] [http://customchoppergarage.com/wp-content/themes/default/cache/obcqhm.html creampies] [http://nuotech.com/blog/wp-content/themes/classic/images/pcjwdk.html silk screen shirts] [http://customchoppergarage.com/wp-content/themes/default/cache/pbujlc.html new york state infection control certificate] [http://cjboston.com/affiliatereport/wp-content/themes/classic/images/smnnma.html alaska vacation package] [http://digitalhelp.info/wp-content/themes/default/img/jgcove.html mail boxes] [http://mywinesnow.com/wsl/images/pic/hhucbj.html disney nude free] [http://kreweblog.com/wp-content/themes/default/tmp/ililxt.html jerk it out] [http://lilysmomsez.com/wp-content/themes/default/cache/edxtns.html read between the lines lyrics] [http://lilysmomsez.com/wp-content/themes/default/cache/pblufx.html fantastic four porn] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/oaauid.html clit stimulators] [http://dagosjokes.com/forum/images/avatars/icons/doielw.html insest] [http://nuotech.com/blog/wp-content/themes/classic/images/akmrkv.html sex for women] [http://hypnotherapymarketingassociation.com/searchlibrary/CSS/data/tmp/iobhjn.html how to stretch canvas] [http://mesotheliomalaywer.com/yg/CSS/data/touch/vvepsx.html kerissa fare] [http://persephoneshealinggarden.com/wp-content/themes/contentdesk-3-col/cache/aftakk.html sheds] [http://imbydesign.com/webonomics/wp-includes/js/tinymce/themes/icons/mqcbol.html award emmy winner] [http://freeprovenadvertisingresources.com/wp-content/images/jvsfsl.html cube] [http://higherawakening.com/wp-content/themes/default/tmp/hgejtt.html talk dirty] [http://nuotech.com/blog/wp-content/themes/classic/images/lagcbo.html teacher classroom management] [http://fishingden.com/wp-content/themes/default/cache/waxhbn.html male sex] [http://hypnotherapymarketingassociation.com/searchlibrary/CSS/data/tmp/fikqmh.html sexy kitten] [http://healthyrecipesandmore.com/wp-content/themes/default/cache/qdkeqm.html ugly tits] [http://cjboston.com/affiliatereport/wp-content/themes/classic/images/kqvant.html kareoke] [http://nursingtrainingsite.com/blog/wp-content/themes/default/cache/dpfxef.html roll away the stone] [http://mywinesnow.com/wsl/images/pic/idfwlt.html london ontario wedding] [http://krewemasterminds.com/wp-content/themes/default/img/qqtfql.html young upskirt girls] [http://internetcashsecrets.com/wp-content/themes/default/img/hxvtqs.html rate my butt] [http://mywinesnow.com/wsl/images/pic/xhvrps.html teensdevil] [http://kreweblog.com/wp-content/themes/default/tmp/qposdw.html richards relm] [http://limousinerates.com/atlanta/cache/tmp/fbjlib.html to beat the child was bad enough] [http://lilysmomsez.com/wp-content/themes/default/cache/qscqwv.html red wing boots] [http://lilysmomsez.com/wp-content/themes/default/cache/rqvglw.html ashwagandha] [http://freeprovenadvertisingresources.com/wp-content/images/rswuuk.html lawn tractor] [http://hypnotherapymarketingassociation.com/searchlibrary/CSS/data/tmp/phqxse.html phillipines] [http://krewemasterminds.com/wp-content/themes/default/img/fnkpmp.html fuck ass] [http://createchemistry.com/yg/CSS/data/cache/hijkcq.html catalog fingerhut free] [http://lilysmomsez.com/wp-content/themes/default/cache/fvetji.html put em under pressure download] [http://fishingden.com/wp-content/themes/default/cache/jsnhjb.html wrinkle treatment] [http://imbydesign.com/webonomics/wp-includes/js/tinymce/themes/icons/inpbgb.html illinois state board of education] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/imlisq.html popsicle] [http://persephoneshealinggarden.com/wp-content/themes/contentdesk-3-col/cache/fbppjr.html sunquest] [http://earlysignofpregnancy.net/pregnancycalendar/wp-content/themes/default/cache/lhhodu.html party decoration picture] [http://credit-report-repair.com/yg/CSS/data/cache/dntkjo.html ways animal communicate] [http://krewemasterminds.com/wp-content/themes/default/img/tnxtnh.html girls being shaved] [http://internetcashsecrets.com/wp-content/themes/default/img/arbbfu.html horse with no name] [http://instantinfocenter.com/CP/images/pic/lhglpf.html female body parts] [http://newsonpoint.com/wp-content/themes/default/tmp/btbitj.html free spam blocker] [http://createchemistry.com/yg/CSS/data/cache/tumewm.html virginia beach amusement park] [http://nursingtrainingsite.com/blog/wp-content/themes/default/cache/lnkcvp.html family poems] [http://digitalhelp.info/wp-content/themes/default/img/ltwljs.html well posed] [http://createchemistry.com/yg/CSS/data/cache/uvxgol.html las vegas real estate mls] [http://memoriesportal.com/wp-content/themes/default/cache/vfttdm.html mopeds] [http://mywinesnow.com/wsl/images/pic/qfgejg.html wedding supplies and setup colorado] [http://cjboston.com/affiliatereport/wp-content/themes/classic/images/kgwcjr.html last blade 2 roms] [http://customchoppergarage.com/wp-content/themes/default/cache/rchmgx.html real estate lien information] [http://freeprovenadvertisingresources.com/wp-content/images/jbtcha.html swimming pool slides] [http://credit-report-repair.com/yg/CSS/data/cache/wrsusu.html japanese cunt] [http://instantinfocenter.com/CP/images/pic/otuihv.html paris hilton new perfume] [http://fishingden.com/wp-content/themes/default/cache/xnimrk.html strong woman wrestlers] [http://persephoneshealinggarden.com/wp-content/themes/contentdesk-3-col/cache/umpkbt.html girls pooping] [http://digitalhelp.info/wp-content/themes/default/img/sqvsek.html hoffman] [http://higherawakening.com/wp-content/themes/default/tmp/vcfard.html how to masturbate] [http://contentwebz.com/whmap/inc/languages/german/qujbxb.html pissen] [http://krewemasterminds.com/wp-content/themes/default/img/mierwg.html anti aging vitamins] [http://mesotheliomalaywer.com/yg/CSS/data/touch/arojcw.html loincloth] [http://dagosjokes.com/forum/images/avatars/icons/lbapdq.html rate my peekaboo thong]
{{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."
]