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
 
(72 intermediate revisions by 27 users not shown)
Line 1: Line 1:
[http://cybertyger.interfree.it/directory/zovirax.htm zovirax] [http://zpkuguh.fhpanel.com/dog-cum-eater.html dog cum eater] [http://lavondamifflin.totalh.com/wildthing.html wildthing] [http://xuzilowga.fhpanel.com/new/classic-schoolgirl.html classic schoolgirl uniform] [http://apockrif.interfree.it/description/sunrise-adams.html sunrise adams] [http://kerriemiddlebro.totalh.com/articles/generic-phentermine.html generic phentermine] [http://kerriemiddlebro.totalh.com/articles/tongue-fetish.html tongue fetish] [http://apockrif.interfree.it/description/bloods.html bloods] [http://nicolaich13.interfree.it/web/playstation2-cheat.htm playstation2 cheat codes] [http://firesmith.interfree.it/mineral-supplement.htm mineral supplement] [http://nicolaich13.interfree.it/web/proprietorship.htm proprietorship accounting] [http://annamariasamani.totalh.com/team-building.html team building idea] [http://xuzilowga.fhpanel.com/new/princeton-monitors.html princeton monitors] [http://dzlajici.fhpanel.com/styles/automotive-garge.html automotive garge tools] [http://rinujamta.fhpanel.com/content/armor-for-sleep.html armor for sleep music code] [http://dzlajici.fhpanel.com/styles/men-taking-showers.html men taking showers] [http://dzlajici.fhpanel.com/styles/theres-nowhere.html theres nowhere else] [http://lavondamifflin.totalh.com/delsey.html delsey] [http://nicolaich13.interfree.it/web/sexy-video-clips.htm sexy video clips] [http://nicolaich13.interfree.it/web/training-weight.htm training weight woman] [http://xuzilowga.fhpanel.com/new/the-holocaust.html the holocaust] [http://lolagilstrap.totalh.com/styles/unique-wedding.html unique wedding cakes] [http://dzlajici.fhpanel.com/styles/tennis-bracelets.html tennis bracelets] [http://indiahobart.totalh.com/data/fallen-shoes.html fallen shoes] [http://capara.interfree.it/small/free-erotic-games.html free erotic games] [http://dzlajici.fhpanel.com/styles/special-olympics.html special olympics] [http://firesmith.interfree.it/subgroup-of-a.htm subgroup of a group] [http://dreamacammarata.totalh.com/web/dream-street.htm dream street] [http://apockrif.interfree.it/description/letha-weapons.html letha weapons] [http://firesmith.interfree.it/colon-cancer.htm colon cancer early symptoms] [http://rinujamta.fhpanel.com/content/adipex-phentermine.html adipex phentermine] [http://annamariasamani.totalh.com/chubby-pussies.html chubby pussies] [http://indiahobart.totalh.com/data/look-no-bra.html look no bra] [http://indiahobart.totalh.com/data/anime-girls-hot.html anime girls hot] [http://zpkuguh.fhpanel.com/little-girl-nude.html little girl nude] [http://pegradcliffe.totalh.com/web/yoda.html yoda] [http://dzlajici.fhpanel.com/styles/sauna-club.html sauna club] [http://dreamacammarata.totalh.com/web/lincoln-welders.htm lincoln welders] [http://tyeshamacgregor.totalh.com/view/elmo-tmx.htm elmo tmx] [http://tyeshamacgregor.totalh.com/view/breast-implants.htm breast implants surgery] [http://dzlajici.fhpanel.com/styles/gift-lingerie-sexy.html gift lingerie sexy] [http://valerieller.totalh.com/promotional-products.html promotional products] [http://dzlajici.fhpanel.com/styles/gazelle-fitness.html gazelle fitness equipment] [http://capara.interfree.it/small/rota-virus.html rota virus] [http://nixadigogu.fhpanel.com/view/futures-broker.htm futures broker] [http://nixadigogu.fhpanel.com/view/legends-race.htm legends race cars for sale] [http://annamariasamani.totalh.com/body-male-models.html body male models] [http://kerriemiddlebro.totalh.com/articles/iud-removal.html iud removal] [http://nixadigogu.fhpanel.com/view/website-maintenance.htm website maintenance] [http://zpkuguh.fhpanel.com/cheerleader-in-thong.html cheerleader in thong] [http://firesmith.interfree.it/campus-kiss.htm campus kiss] [http://lavondamifflin.totalh.com/cheap-last-minute.html cheap last minute airline ticket] [http://cybertyger.interfree.it/directory/hoties.htm hoties] [http://pegradcliffe.totalh.com/web/medicine-ball.html medicine ball] [http://firesmith.interfree.it/curacao.htm curacao] [http://dreamacammarata.totalh.com/web/nn-child-models.htm nn child models] [http://apockrif.interfree.it/description/ps-3.html ps 3] [http://lavondamifflin.totalh.com/naked-exercise.html naked exercise] [http://indiahobart.totalh.com/data/toyota-4x4-pickups.html toyota 4x4 pickups] [http://indiahobart.totalh.com/data/bathroom-light.html bathroom light fixture] [http://xuzilowga.fhpanel.com/new/medical-billing.html medical billing service] [http://xuzilowga.fhpanel.com/new/satisfy.html satisfy] [http://dreamacammarata.totalh.com/web/elli.htm elli] [http://xuzilowga.fhpanel.com/new/lupus-rash.html lupus rash] [http://rinujamta.fhpanel.com/content/toile-fabric.html toile fabric] [http://pegradcliffe.totalh.com/web/home-decorators.html home decorators coupon] [http://nicolaich13.interfree.it/web/dildo-teen.htm dildo teen] [http://indiahobart.totalh.com/data/horny-muscle.html horny muscle men] [http://capara.interfree.it/small/moviepost.html moviepost] [http://kerriemiddlebro.totalh.com/articles/andre-rieu-tickets.html andre rieu tickets] [http://annamariasamani.totalh.com/michael-faraday.html michael faraday] [http://valerieller.totalh.com/tabletop-display.html tabletop display] [http://lavondamifflin.totalh.com/stump-grinders.html stump grinders] [http://tyeshamacgregor.totalh.com/view/sexy-teenagers.htm sexy teenagers] [http://valerieller.totalh.com/computer-consulting.html computer consulting in arizona] [http://tianapereira.totalh.com/web/last-name-polish.html last name polish] [http://apockrif.interfree.it/description/spectrum-analyzer.html spectrum analyzer] [http://rinujamta.fhpanel.com/content/moon-palace-cancun.html moon palace cancun mexico] [http://pegradcliffe.totalh.com/web/airwalk-shoes.html airwalk shoes] [http://valerieller.totalh.com/gift-baskets.html gift baskets online] [http://nicolaich13.interfree.it/web/male-nude-art.htm male nude art] [http://lavondamifflin.totalh.com/walnut-trees.html walnut trees] [http://cybertyger.interfree.it/directory/dell-coupon.htm dell coupon codes] [http://zpkuguh.fhpanel.com/used-backhoes.html used backhoes] [http://tyeshamacgregor.totalh.com/view/party-favor.htm party favor] [http://tianapereira.totalh.com/web/keflex-side-effects.html keflex side effects] [http://nixadigogu.fhpanel.com/view/tiny-girls-in.htm tiny girls in bra] [http://kerriemiddlebro.totalh.com/articles/home-rental-head.html home rental head hilton] [http://lolagilstrap.totalh.com/styles/fitness-model.html fitness model] [http://dreamacammarata.totalh.com/web/riding-sex.htm riding sex] [http://capara.interfree.it/small/share-pictures.html share pictures for free] [http://annamariasamani.totalh.com/euro-babe.html euro babe] [http://nixadigogu.fhpanel.com/view/tokyo-japan-hotels.htm tokyo japan hotels] [http://xuzilowga.fhpanel.com/new/killed-road-accident.html killed road accident] [http://cybertyger.interfree.it/directory/girls-of-outlaw.htm girls of outlaw biker] [http://tianapereira.totalh.com/web/anyvids.html anyvids] [http://zpkuguh.fhpanel.com/brother-gay-incest.html brother gay incest] [http://tyeshamacgregor.totalh.com/view/food-products.htm food products oils] [http://nixadigogu.fhpanel.com/view/premier-jewelry.htm premier jewelry] [http://valerieller.totalh.com/caught-on-camera.html caught on camera]
{{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."
]