Func combine ball spawner: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added class hierarchy, cleanup)
 
(23 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{wrongtitle|title=func_combine_ball_spawner}}
[[File:Citadel_energy_ball.jpg|200px|right|thumbnail|An energy ball pulled from a spawner (to the left). The ball spawners behind the soldiers use the same entity, with different settings.]]
{{CD|CFuncCombineBallSpawner|file1=prop_combine_ball.cpp}}
{{this is a|brush entity|name=func_combine_ball_spawner|game=Half-Life 2 series|game1=Portal series}} It's a brush that creates and contains {{ent|prop_combine_ball}}s. See the {{ent|combine_ball_generator}} and {{ent|combine_ballspawner}} prefabs for examples of uses.


==Entity Description==
== Flags ==
A volumetric trigger that creates combine balls.
{{fl|4096|Start Inactive}}
{{fl|8192|Combine Power Supply|If set, balls will bounce as if in a power generator, like in {{ent|d3_c17_10b}}{{hl2}} (Overwatch Nexus). If not set, they will behave like balls inside the pillars of light seen frequently in the [[Citadel]].}}


{{sfx_brush}}
== Keyvalues ==
{{KV Targetname}}
{{KV|Ball count|intn=ballcount|integer|How many balls will be bouncing around.}}
{{KV|Min ball speed|intn=minspeed|float|The minimum speed of balls.}}
{{KV|Max ball speed|intn=maxspeed|float|The maximum speed of balls.}}
{{KV|Ball radius|intn=ballradius|float|Controls the size of balls. Seems to only make smaller balls.


See the [[combine_ball_generator]] and [[combine_ballspawner]] prefabs for examples of uses.
{{note|The balls appear normal size when grabbed with the super phys gun.}}}}
{{KV|Ball Type|intn=balltype|choices|Non-functional for this entity. All balls will spawn as the first type.}}
{{KV|Ball Respawn Time|intn=ballrespawntime|float|When balls explode (from being outside the field for too long) for an amount of time, wait this long until spawning new balls.}}
{{note|When set to -1 balls won't respawn if the combine power supply flag is checked.}}


==Availability==
== Inputs ==
{{in game|brush}} {{game|HL2}}
{{I EnableDisable}}
{{in code|class=class_c_func_combine_ball_spawner.html CFuncCombineBallSpawner|file=prop__combine__ball_8cpp-source.html hl2_dll\prop_combine_ball.cpp}}


==Keyvalues==
== Outputs ==
* {{KV Targetname}}
{{O|OnBallGrabbed|Fired when a ball is disrupted and considered outside the container, normally by punting or pulling with the gravity gun. {{ent|!activator}} is the {{ent|prop_combine_ball}}.}}
* {{KV Angles}}
{{O|OnBallHitBottomSide|Fired when a ball hits the bottom of its container, then bounces back up.}}
* {{KV Global}}
{{O|OnBallHitTopSide|Fired when a ball hits the top of its container, then bounces back down.}}
* '''ballcount'''
{{O|OnBallReinserted|Fired when a ball re-enters the container.}}
: <integer> This is how many balls will be bouncing around inside the spawner.
{{O|OnFirstBallReinserted|Fired when there's only one ball (remaining), and it re-enters the container. Useful for re-powering something.
* '''minspeed'''
: <float> The minimum speed of balls that fly in the spawner.
* '''maxspeed'''
: <float> The maximum speed of balls that fly in the spawner.
* '''ballradius'''
: <float> The radius of the energy balls.
* '''balltype'''
: <choices>
:{|
! Literal Value || Description
|-
| 0 || Combine Energy Ball 1
|-
| 1 || Combine Energy Ball 2
|-
| 2 || Combine Energy Ball 3
|}
* '''ballrespawntime'''
: <float> The energy balls' respawn time.


==Flags==
{{note|<code>OnBallReinserted</code> will also fire whenever this does.}}}}
* 4096 : Start Inactive
{{O|OnLastBallGrabbed|Fired when there's only one ball (remaining), and it is disrupted.
* 8192 : Combine Power Supply
:If set, combine balls will bounce in this entity's volume.


==Inputs==
{{note|<code>OnBallGrabbed</code> will also fire whenever this does.}}}}
* {{I Targetname}}
* '''Enable'''
:
* '''Disable'''
:


==Outputs==
== See also ==
* {{O Targetname}}
*{{ent|point_combine_ball_launcher}}
* '''OnBallGrab'''
 
{{todo|Write what it does.}}
[[Category:SFX Brush Entities]]
:{{activator|prop_combine_ball}}
* '''OnBallHitBottomSide'''
{{todo|Write what it does.}}
:{{activator|prop_combine_ball}}
* '''OnBallHitTopSide'''
{{todo|Write what it does.}}
:{{activator|prop_combine_ball}}
* '''OnBallReinserted'''
{{todo|Write what it does.}}
:{{activator|prop_combine_ball}}
* '''OnFirstBallReinserted'''
{{todo|Write what it does.}}
:{{activator|prop_combine_ball}}
[[Category:Entities]][[Category:Brush Entities]]

Latest revision as of 13:10, 25 September 2024

An energy ball pulled from a spawner (to the left). The ball spawners behind the soldiers use the same entity, with different settings.
C++ Class hierarchy
CFuncCombineBallSpawner
CBaseEntity
C++ prop_combine_ball.cpp

func_combine_ball_spawner is a brush entity available in Half-Life 2 series Half-Life 2 series and Portal series Portal series. It's a brush that creates and contains prop_combine_balls. See the combine_ball_generator and combine_ballspawner prefabs for examples of uses.

Flags

Start Inactive : [4096]
Combine Power Supply : [8192]
If set, balls will bounce as if in a power generator, like in d3_c17_10bHalf-Life 2 (Overwatch Nexus). If not set, they will behave like balls inside the pillars of light seen frequently in the Citadel.

Keyvalues

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

Ball count (ballcount) <integer>
How many balls will be bouncing around.
Min ball speed (minspeed) <float>
The minimum speed of balls.
Max ball speed (maxspeed) <float>
The maximum speed of balls.
Ball radius (ballradius) <float>
Controls the size of balls. Seems to only make smaller balls.
Note.pngNote:The balls appear normal size when grabbed with the super phys gun.
Ball Type (balltype) <choices>
Non-functional for this entity. All balls will spawn as the first type.
Ball Respawn Time (ballrespawntime) <float>
When balls explode (from being outside the field for too long) for an amount of time, wait this long until spawning new balls.
Note.pngNote:When set to -1 balls won't respawn if the combine power supply flag is checked.

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

OnBallGrabbed
Fired when a ball is disrupted and considered outside the container, normally by punting or pulling with the gravity gun. !activator is the prop_combine_ball.
OnBallHitBottomSide
Fired when a ball hits the bottom of its container, then bounces back up.
OnBallHitTopSide
Fired when a ball hits the top of its container, then bounces back down.
OnBallReinserted
Fired when a ball re-enters the container.
OnFirstBallReinserted
Fired when there's only one ball (remaining), and it re-enters the container. Useful for re-powering something.
Note.pngNote:OnBallReinserted will also fire whenever this does.
OnLastBallGrabbed
Fired when there's only one ball (remaining), and it is disrupted.
Note.pngNote:OnBallGrabbed will also fire whenever this does.

See also