Point energy ball launcher: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Updated)
Line 1: Line 1:
{{portal series point|title=point_energy_ball_launcher}}
{{portal series point|point_energy_ball_launcher}}


== Entity description ==
==Entity description==
An entity that spawns and launches an energy ball periodically.
An entity that spawns and launches an energy ball periodically.
{{note|In Portal 2, the models and materials for the actual balls are missing and must be copied from HL2.}}
{{note|In Portal 2, the models and materials for the actual balls are missing and must be copied from HL2.}}


== Keyvalues ==
==Keyvalues==
* {{KV Targetname}}
{{KV|Ball Lifetime|float|The time in seconds the ball will live before self-destructing. A negative value will give infinite life.}}
* {{KV Parentname}}
{{KV|Min life after portal transition|float|When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum.}}
* {{KV Angles}}
{{KV|Ball count|integer|This is how many balls will be bouncing around inside the spawner}}
* {{KV Global}}
{{KV|Min ball speed|float|The minimum speed of balls that fly in the spawner}}
* '''Ball Lifetime'''
{{KV|Max ball speed|float|The maximum speed of balls that fly in the spawner}}
: <float> The time in seconds the ball will live before self-destructing. A negative value will give infinite life.
{{KV|Ball radius|float|The radius of the energy balls}}
* '''Min life after portal transition'''
{{KV|Ball Type|choices|Combine Ball Type}}
: <float> When energy balls created by this launcher pass, if the remaining lifespan of the ball is less than this value, the lifespan will reset to this value.
:* 0 : Combine Energy Ball 1
* '''ballcount'''
:* 1 : Combine Energy Ball 2
: <integer> The amount of balls bouncing around inside the spawner.
:* 2 : Combine Energy Ball 3
* '''minspeed'''
{{KV|Ball Respawn Time|float|The energy balls respawn time}}
: <float> The minimum speed of balls spawned.
{{KV Targetname}}
* '''maxspeed'''
{{KV Parentname}}
: <float> The maximum speed of balls spawned.
{{KV Origin}}
* '''ballradius'''
{{KV Angles}}
: <float> The radius of the energy balls.
{{KV Global}}
* '''balltype'''
: <choices>
:{| class=standard-table
! 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.


== Inputs ==
==Flags==
* {{I EnableDisable}}
* 4096 : Start inactive
* '''LaunchBall'''
* 8192 : Combine power supply
: Launch a ball from the spawner.


== Outputs ==
==Inputs==
* {{O Targetname}}
{{IO|LaunchBall}}
* '''OnPostSpawnBall'''
{{IO|Enable|Enable spawning of combine balls}}
: Fire when a ball was launched.
{{IO|Disable|Disable spawning of combine balls}}
{{I Parentname}}
{{I Targetname}}
 
==Outputs==
{{IO|OnPostSpawnBall|Fired after the ball has spawned.}}
{{IO|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)}}
{{IO|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)}}
{{IO|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 Targetname}}


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

Revision as of 01:39, 13 May 2011

Template:Portal series point

Entity description

An entity that spawns and launches an energy ball periodically.

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

Keyvalues

Ball Lifetime ([todo internal name (i)]) <float>
The time in seconds the ball will live before self-destructing. A negative value will give infinite life.
Min life after portal transition ([todo internal name (i)]) <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 ([todo internal name (i)]) <integer>
This is how many balls will be bouncing around inside the spawner
Min ball speed ([todo internal name (i)]) <float>
The minimum speed of balls that fly in the spawner
Max ball speed ([todo internal name (i)]) <float>
The maximum speed of balls that fly in the spawner
Ball radius ([todo internal name (i)]) <float>
The radius of the energy balls
Ball Type ([todo internal name (i)]) <choices>
Combine Ball Type
  • 0 : Combine Energy Ball 1
  • 1 : Combine Energy Ball 2
  • 2 : Combine Energy Ball 3
Ball Respawn Time ([todo internal name (i)]) <float>
The energy balls respawn time
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

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.
Global:
Global Entity Name (globalname) <string>
Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

Flags

  • 4096 : Start inactive
  • 8192 : Combine power supply

Inputs

LaunchBall
Enable
Enable spawning of combine balls
Disable
Disable spawning of combine balls
Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.


Outputs

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