Point energy ball launcher: 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.)
(-added class hierarchy, cleanup)
 
Line 1: Line 1:
{{CD|CEnergyBallLauncher|nolink=1|file1=prop_energy_ball.cpp}}
{{this is a|point entity|name=point_energy_ball_launcher|series=Portal}}  
{{this is a|point entity|name=point_energy_ball_launcher|series=Portal}}  
==Entity description==
It spawns and launches a [[prop_energy_ball]] periodically.
It spawns and launches a [[prop_energy_ball]] periodically.
{{note|In Portal 2, the models, materials, and sounds for the actual balls are missing and must be copied from HL2.}}
{{note|In Portal 2, the models, materials, and sounds for the actual balls are missing and must be copied from HL2.}}


==Keyvalues==
== Keyvalues ==
{{KV Targetname}}
{{KV|Ball Lifetime|intn=balllifetime|float|The time in seconds the ball will live before self-destructing. A negative value will give infinite life.}}
{{KV|Ball Lifetime|intn=balllifetime|float|The time in seconds the ball will live before self-destructing. A negative value will give infinite life.}}
{{KV|Min life after portal transition|intn=minlifeafterportal|float|When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum.}}
{{KV|Min life after portal transition|intn=minlifeafterportal|float|When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum.}}
Line 20: Line 20:
{{KV|Ball flicker material override|intn=ballmaterial2|material|Overrides the other ball material.|only={{P2CE}}}}
{{KV|Ball flicker material override|intn=ballmaterial2|material|Overrides the other ball material.|only={{P2CE}}}}
{{KV|Ball knockback multiplier|intn=ballknockback|float|The ball's velocity is multiplied by this value to determine how strongly to knockback hit objects. Use 1 for 1:1 speed = knockback radio.|only={{P2CE}}}}
{{KV|Ball knockback multiplier|intn=ballknockback|float|The ball's velocity is multiplied by this value to determine how strongly to knockback hit objects. Use 1 for 1:1 speed = knockback radio.|only={{P2CE}}}}
{{KV BaseEntity|base=1|l4d2=1}}


==Flags==
== Flags ==
* 1 : Override ball material {{P2CE}}
{{fl|1|Override ball material {{P2CE}}}}
* 4096 : Start inactive
{{fl|4096|Start inactive}}
* 8192 : Combine power supply
{{fl|8192|Combine power supply}}


==Inputs==
== Inputs ==
{{IO|BallCaught|Ball this launcher created was 'caught'.|since=P2}}
{{I|BallCaught|Ball this launcher created was 'caught'.|since=P2}}
{{IO|LaunchBall}}
{{I|LaunchBall}}
{{IO|Enable|Enable spawning of combine balls}}
{{I|Enable|Enable spawning of combine balls}}
{{IO|Disable|Disable spawning of combine balls}}
{{I|Disable|Disable spawning of combine balls}}
{{I BaseEntity|base=1|l4d2=1|portal2=1}}


==Outputs==
== Outputs ==
{{IO|OnBallCaught|Fired when a ball this entity has launched has been 'caught'.|since=P2}}
{{O|OnBallCaught|Fired when a ball this entity has launched has been 'caught'.|since=P2}}
{{IO|OnPostSpawnBall|Fired after the ball has spawned.}}
{{O|OnPostSpawnBall|Fired after the ball has spawned.}}
{{IO|OnBallGrabbed|Fired when a combine ball is grabbed from the field by a mega physcannon}}
{{O|OnBallGrabbed|Fired when a combine ball is grabbed from the field by a mega physcannon}}
{{IO|OnBallReinserted|Fired when a combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)}}
{{O|OnBallReinserted|Fired when a combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)}}
{{IO|OnBallHitTopSide|Fired when a combine ball in hits the top side of the field (only gets triggered when Combine Power supply is checked)}}
{{O|OnBallHitTopSide|Fired when a combine ball in hits the top side of the field (only gets triggered when Combine Power supply is checked)}}
{{IO|OnBallHitBottomSide|Fired when a combine ball in hits the bottom side of the field (only gets triggered when Combine Power supply is checked)}}
{{O|OnBallHitBottomSide|Fired when a combine ball in hits the bottom side of the field (only gets triggered when Combine Power supply is checked)}}
{{IO|OnLastBallGrabbed|Fired when the last combine ball is grabbed from the field by a mega physcannon}}
{{O|OnLastBallGrabbed|Fired when the last combine ball is grabbed from the field by a mega physcannon}}
{{IO|OnFirstBallReinserted|Fired when the first combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)}}
{{O|OnFirstBallReinserted|Fired when the first combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)}}
{{O BaseEntity}}


==See also==
== See also ==
*[[Creating an energy ball launcher and catcher]]
* [[Creating an energy ball launcher and catcher]]

Latest revision as of 14:05, 25 September 2024

C++ Class hierarchy
CEnergyBallLauncher
CPointCombineBallLauncher
CFuncCombineBallSpawner
CBaseEntity
C++ prop_energy_ball.cpp

point_energy_ball_launcher is a point entity available in Portal series Portal series. It spawns and launches a prop_energy_ball periodically.

Note.pngNote:In Portal 2, the models, materials, and sounds for the actual balls are missing and must be copied from HL2.

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 Lifetime (balllifetime) <float>
The time in seconds the ball will live before self-destructing. A negative value will give infinite life.
Min life after portal transition (minlifeafterportal) <float>
When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum.
Ball count (ballcount) <integer>
This is how many balls will be bouncing around inside the spawner
Min ball speed (minspeed) <float>
The minimum speed of balls that fly in the spawner
Max ball speed (maxspeed) <float>
The maximum speed of balls that fly in the spawner
Ball radius (ballradius) <float>
The radius of the energy balls
Ball Type (balltype) <choices>
Has no effect.
Ball Respawn Time (ballrespawntime) <float>
The energy balls respawn time
Ball Bounces (maxballbounces) <integer> (only in Portal 2: Community Edition)
Sets on which bounce the ball should explode. (Ported from HL2 combine balls)
Ball Damage (balldamage) <float> (only in Portal 2: Community Edition)
The amount of damage the ball should deal to players
Ball explode player (ballexplodeplayer) <boolean> (only in Portal 2: Community Edition)
Sets if the ball should explode on player contact or ignore the player
Ball body material override (ballmaterial1) <material> (only in Portal 2: Community Edition)
Override the main ball material.
Ball flicker material override (ballmaterial2) <material> (only in Portal 2: Community Edition)
Overrides the other ball material.
Ball knockback multiplier (ballknockback) <float> (only in Portal 2: Community Edition)

Flags

Override ball material Portal 2: Community Edition : [1]
Start inactive : [4096]
Combine power supply : [8192]

Inputs

BallCaught  (in all games since Portal 2)
Ball this launcher created was 'caught'.
LaunchBall
Enable
Enable spawning of combine balls
Disable
Disable spawning of combine balls

Outputs

OnBallCaught  (in all games since Portal 2)
Fired when a ball this entity has launched has been 'caught'.
OnPostSpawnBall
Fired after the ball has spawned.
OnBallGrabbed
Fired when a combine ball is grabbed from the field by a mega physcannon
OnBallReinserted
Fired when a combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)
OnBallHitTopSide
Fired when a combine ball in hits the top side of the field (only gets triggered when Combine Power supply is checked)
OnBallHitBottomSide
Fired when a combine ball in hits the bottom side of the field (only gets triggered when Combine Power supply is checked)
OnLastBallGrabbed
Fired when the last combine ball is grabbed from the field by a mega physcannon
OnFirstBallReinserted
Fired when the first combine ball is reinserted into the field (only gets triggered when Combine Power supply is checked)

See also