Func combine ball spawner: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
m (Intn)
Line 10: Line 10:


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


{{note|The balls appear normal size when grabbed with the super phys gun.}}}}
{{note|The balls appear normal size when grabbed with the super phys gun.}}}}
{{KV|Ball Type (balltype)|choices|Non-functional for this entity. All balls will spawn as the first type.}}
{{KV|Ball Type|intn=balltype|choices|Non-functional for this entity. All balls will spawn as the first type.}}
{{KV|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.}}
{{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.}}
{{note|When set to -1 balls won't respawn if the combine power supply flag is checked.}}
{{KV BaseEntity|l4d2=1|brush=1}}
{{KV BaseEntity|l4d2=1|brush=1}}

Revision as of 14:09, 10 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.

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

C++ In code, it is represented by theCFuncCombineBallSpawnerclass, defined in theprop_combine_ball.cppfile.

Flags

  • 4096: Start Inactive
  • 8192: Combine Power Supply
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

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