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

Env bubbles: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(raw; needs cleanup)
 
No edit summary
 
(46 intermediate revisions by 23 users not shown)
Line 1: Line 1:
{{cleanup}}
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Env bubbles}}{{tabs|env_bubbles|goldsrc=1|source=1|main=source}}
env_bubbles
{{CD|CBubbling|file1=effects.cpp}}
[[File:Env bubbles.gif|frame|right|280px|<code>env_bubbles</code> in game, with density set to 6 and frequency set to 2.]]
{{this is a|brush entity|name=env_bubbles}} It is used to create a volume in which to spawn rising bubbles. The number and frequency of bubbles can be adjusted.


An entity used to create a volume in which to spawn bubbles.
<code>env_bubbles</code> is obviously intended for use in water, but it can be used outside of water if such an effect is desired.


KEYS
{{note|Tying a [[Triggers#Level design|toolstrigger]] brush to this entity will result in the entity being rendered in-game as a raw brush of said material. It should be set to Nodraw or Invisible instead.}}
{{Note|Used bubble sprite: <code>sprites/bubble.vmt</code>}}
{{note|In order to make it work in {{Game link|Portal 2}}, the bubble sprite material (<code>sprites/bubble.vmt</code>) and texture (<code>sprites/bubble.vtf</code>) must be located in the /material/sprites folder and the [[TeamSpen's Hammer Addons]] installed, or at least its portal2.fgd located in the /Portal 2/bin folder.}}
__NOTOC__
==Keyvalues==
{{KV|Bubble density|intn=density|integer|Bubble Count in Volume.}}
{{KV|Bubble frequency|intn=frequency|integer|Bubble emission frequency, in bubbles per second.}}
{{KV|Speed of Current|intn=current|integer|The speed of the water current in the volume, used to move the bubbles.}}


Name targetname <target_source> The name that other entities refer to this entity by.
==Inputs==
{{I|Activate|Activates the bubbles.}}
{{I|Deactivate|Deactivates the bubbles.}}
{{I|Toggle|Toggles the bubbles on and off.}}
{{I|SetDensity|Sets the bubble density.|param=integer}}
{{I|SetFrequency|Sets bubble emission rate in bubbles per second.|param=integer}}
{{I|SetCurrent|Sets current speed in inches per second.|param=integer}}


Parent parentname <target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
==Flags==
{{fl|1|Start Off}}


Bubble density density <integer>
==See also==
*{{ent|env_embers}} - A similar entity.


Bubble frequency frequency <integer>
[[category:SFX_Brush_Entities]]
 
Speed of Current current <integer> The speed of the water current in the volume, used to move the bubbles.
 
spawnflags spawnflags <flags>
 
 
INPUTS
 
Kill Removes this entity from the world.
 
KillHierarchy Removes this entity and all its children from the world.
 
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
SetParent <string> Changes the entity's parent in the movement hierarchy.
 
SetParentAttachment <string> Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
 
ClearParent Removes this entity from the the movement hierarchy, leaving it free to move independently.
 
Activate Activates the bubbles.
 
Deactivate Deactivates the bubbles.
 
Toggle Toggles the bubbles on and off.
 
SetDensity <integer> Sets the bubble density.
 
SetFrequency <integer> Sets bubble emission rate in bubbles per second.
 
SetCurrent <integer> Sets current speed in inches per second.
 
 
OUTPUTS
 
OnUser1 Fired in response to FireUser1 input.
 
OnUser2 Fired in response to FireUser2 input.
 
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.

Latest revision as of 21:49, 16 June 2025

English (en)中文 (zh)Translate (Translate)
C++ Class hierarchy
CBubbling
CBaseEntity
C++ effects.cpp
env_bubbles in game, with density set to 6 and frequency set to 2.

env_bubbles is a brush entity available in all Source Source games. It is used to create a volume in which to spawn rising bubbles. The number and frequency of bubbles can be adjusted.

env_bubbles is obviously intended for use in water, but it can be used outside of water if such an effect is desired.

Note.pngNote:Tying a toolstrigger brush to this entity will result in the entity being rendered in-game as a raw brush of said material. It should be set to Nodraw or Invisible instead.
Note.pngNote:Used bubble sprite: sprites/bubble.vmt
Note.pngNote:In order to make it work in Portal 2 Portal 2 , the bubble sprite material (sprites/bubble.vmt) and texture (sprites/bubble.vtf) must be located in the /material/sprites folder and the TeamSpen's Hammer Addons installed, or at least its portal2.fgd located in the /Portal 2/bin folder.

Keyvalues

Bubble density (density) <integer>
Bubble Count in Volume.
Bubble frequency (frequency) <integer>
Bubble emission frequency, in bubbles per second.
Speed of Current (current) <integer>
The speed of the water current in the volume, used to move the bubbles.

Inputs

Activate
Activates the bubbles.
Deactivate
Deactivates the bubbles.
Toggle
Toggles the bubbles on and off.
SetDensity <integerRedirectInput/integer>
Sets the bubble density.
SetFrequency <integerRedirectInput/integer>
Sets bubble emission rate in bubbles per second.
SetCurrent <integerRedirectInput/integer>
Sets current speed in inches per second.

Flags

Start Off : [1]

See also