Env bubbles: Difference between revisions
Jump to navigation
Jump to search
Bug:Tying a toolstrigger brush to this entity will result in the entity being rendered in-game as a raw brush of said material, unless VBSP was compiled with
Code Fix:In the spawn function, set rendermode to kRenderTransTexture (2) like its
counterpart, or better yet, set EF_NODRAW. The bubbles themselves are sent to clients using temporary entities, so they will still be rendered.
Note:Used bubble sprite:
Note:In order to make it work in Portal 2, the bubble sprite material (
SirYodaJedi (talk | contribs) (This is a bug. It worked "correctly" in GoldSrc (code set rendermode to 2), but this behavior was broken when porting to Source.) |
SirYodaJedi (talk | contribs) m (→Inputs) |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{lang|Env bubbles}}{{tabs|env_bubbles|goldsrc=1|source=1|main=source}} | |||
{{CD|CBubbling|file1=effects.cpp}} | {{CD|CBubbling|file1=effects.cpp}} | ||
[[File:Env bubbles.gif| | [[File:Env bubbles.gif|thumb|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. | {{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. | ||
<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. | <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. | ||
{{bug|hidetested=1|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, unless VBSP was compiled with {{code|-nodrawtriggers}}. It should be set to Nodraw or Invisible instead.}} | {{bug|hidetested=1|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, unless VBSP was compiled with {{code|-nodrawtriggers}}. It should be set to Nodraw or Invisible instead. {{code fix|In the spawn function, set [[rendermode]] to {{mono|kRenderTransTexture}} (2) like its {{goldsrc}} counterpart, or better yet, set [[EF_NODRAW]]. The bubbles themselves are sent to clients using [[temporary entities]], so they will still be rendered.}} }} | ||
{{Note|Used bubble sprite: <code>sprites/bubble.vmt</code>}} | {{Note|Used bubble sprite: <code>sprites/bubble.vmt</code>}} | ||
{{note|In order to make it work in {{portal2|1}}, 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.}} | {{note|In order to make it work in {{portal2|1}}, 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.}} | ||
| Line 14: | Line 14: | ||
{{KV|Bubble density|intn=density|integer|Bubble Count in Volume.}} | {{KV|Bubble density|intn=density|integer|Bubble Count in Volume.}} | ||
{{KV|Bubble frequency|intn=frequency|integer|Bubble emission frequency, in bubbles per second, values include negative numbers E.G. -10}} | {{KV|Bubble frequency|intn=frequency|integer|Bubble emission frequency, in bubbles per second, values include negative numbers E.G. -10}} | ||
{{KV|Speed of Current|intn=current| | {{KV|Speed of Current|intn=current|float|The speed of the water current in the volume, used to move the bubbles.}} | ||
==Inputs== | ==Inputs== | ||
| Line 20: | Line 20: | ||
{{I|Deactivate|Deactivates the bubbles.}} | {{I|Deactivate|Deactivates the bubbles.}} | ||
{{I|Toggle|Toggles the bubbles on and off.}} | {{I|Toggle|Toggles the bubbles on and off.}} | ||
{{I|SetDensity|Sets the bubble density. | {{I|SetDensity|param=integer|Sets the bubble density.}} | ||
{{I|SetFrequency|Sets bubble emission rate in bubbles per second. | {{I|SetFrequency|param=integer|Sets bubble emission rate in bubbles per second.}} | ||
{{I|SetCurrent|Sets current speed in inches per second.| | {{I|SetCurrent|param=integer|Sets current speed in inches per second.}} | ||
:{{note|Even though this input writes to a float, it only takes integer values.{{confirm|It might be possible to [[AddOutput]] the {{mono|current}} (or {{mono|speed}}) KVs, as all this input does is set the {{mono|m_flSpeed}} variable.}} }} | |||
==Flags== | ==Flags== | ||
Latest revision as of 08:12, 14 November 2025
| CBubbling |
env_bubbles is a brush entity available in all
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.
-nodrawtriggers. It should be set to Nodraw or Invisible instead. sprites/bubble.vmtsprites/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
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report. - See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Bubble density (density) <integer>
- Bubble Count in Volume.
- Bubble frequency (frequency) <integer>
- Bubble emission frequency, in bubbles per second, values include negative numbers E.G. -10
- Speed of Current (current) <float>
- 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 <integer>
- Sets the bubble density.
- SetFrequency <integer>
- Sets bubble emission rate in bubbles per second.
- SetCurrent <integer>
- Sets current speed in inches per second.
Note:Even though this input writes to a float, it only takes integer values.
Confirm:It might be possible to AddOutput the current (or speed) KVs, as all this input does is set the m_flSpeed variable.
Flags
- Start Off : [1]
See also
- env_embers - A similar entity.