Point tesla: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (typo)
(Cleanup)
Line 1: Line 1:
{{wrongtitle|title=point_tesla}}
{{base point|point_tesla}}
 
{{base_point}}
[[File:Point_Tesla.jpg|thumb|260px|An active point_tesla]]


==Entity Description==
==Entity Description==
[[{{ns:6}}:Point_Tesla.jpg|thumb|300px|An active point_tesla]]
An entity that creates lightning arcs around its origin similar to the ones created by Nicola Tesla's famous [http://en.wikipedia.org/wiki/Tesla_coil Tesla Coil] invention.  
An entity that creates lightning arcs around its origin similar to the ones created by Nicola Tesla's famous [http://en.wikipedia.org/wiki/Tesla_coil Tesla Coil] invention.  


Line 12: Line 10:
{{in code|class=class_c_tesla.html CTesla|file=tesla_8cpp-source.html tesla.cpp}}
{{in code|class=class_c_tesla.html CTesla|file=tesla_8cpp-source.html tesla.cpp}}


==Keyvalues==
== Keyvalues ==
*{{KV Targetname}}
{{KV|Source Entity|string|If specified, tesla lightning will originate from the specified entity. Otherwise, they originate from this entity.}}
*{{KV Parentname}}
{{KV|Sound Name|string|Sound to be played whenever lightning is created.}}
*'''m_SourceEntityName'''
{{KV|Sprite Name|sprite|Material to use for the tesla lightning beams.}}
:<target_destination> If specified, tesla lightning will originate from the specified entity. Otherwise, they originate from this entity.
{{KV|Color|color255|Beam color.}}
*'''m_SoundName'''
{{KV|Radius|integer|Radius around the origin to find a point to strike with a tesla lightning beam.}}
:<sound> Sound to be played whenever lightning is created.
{{KV|Min # of Beams|integer|Minimum number of tesla lightning beams to create when creating an arc.}}
*'''texture'''
{{KV|Max # of Beams|integer|Maximum number of tesla lightning beams to create when creating an arc.}}
:<sprite> Material to use for the tesla lightning beams. (sprites/physbeam.vmt)
{{KV|Min Beam Width|string|Minimum width of the tesla lightning beams.}}
*'''m_Color'''
{{KV|Max Beam Width|string|Maximum width of the tesla lightning beams.}}
:{{color}} Color.
{{KV|Min Time Visible|string|Minimum lifetime of the tesla lightning beams.}}
*'''m_flRadius'''
{{KV|Max Time Visible|string|Maximum lifetime of the tesla lightning beams.}}
:<float> Radius around the origin to find a point to strike with a tesla lightning beam.
{{KV|Min Time Between Arcs|string|Minimum time delay between random arcing.}}
*'''beamcount_min'''
{{KV|Max Time Between Arcs|string|Maximum time delay between random arcing.}}
:<integer> Minimum number of tesla lightning beams to create when creating an arc.
{{KV Targetname}}
*'''beamcount_max'''
{{KV Parentname}}
:<integer> Maximum number of tesla lightning beams to create when creating an arc.
*'''thick_min'''
:<float> Minimum width of the tesla lightning beams.
*'''thick_max'''
:<float> Maximum width of the tesla lightning beams.
*'''lifetime_min'''
:<float> Minimum lifetime of the tesla lightning beams.
*'''lifetime_max'''
:<float> Maximum lifetime of the tesla lightning beams.
*'''interval_min'''
:<float> Minimum time delay between random arcing.
*'''interval_max'''
:<float> Maximum time delay between random arcing.


==Inputs==
== Inputs ==
*{{i Targetname}}
{{IO|TurnOn|Turn emitter on.}}
*{{I Parentname}}
{{IO|TurnOff|Turn emitter off.}}
*'''TurnOn'''
{{IO|DoSpark|Force a single arc.}}
:Turn emitter on.
{{I Targetname}}
*'''TurnOff'''
{{I Parentname}}
:Turn emitter off.
*'''DoSpark'''
:Force a single arc.


==Outputs==
== Outputs ==
*{{o Targetname}}
{{O Targetname}}

Revision as of 10:22, 7 June 2011

Template:Base point

An active point_tesla

Entity Description

An entity that creates lightning arcs around its origin similar to the ones created by Nicola Tesla's famous Tesla Coil invention.

Availability

Template:In game Template:Game-base Template:In code

Keyvalues

Source Entity ([todo internal name (i)]) <string>
If specified, tesla lightning will originate from the specified entity. Otherwise, they originate from this entity.
Sound Name ([todo internal name (i)]) <string>
Sound to be played whenever lightning is created.
Sprite Name ([todo internal name (i)]) <sprite>
Material to use for the tesla lightning beams.
Color ([todo internal name (i)]) <color255>
Beam color.
Radius ([todo internal name (i)]) <integer>
Radius around the origin to find a point to strike with a tesla lightning beam.
Min # of Beams ([todo internal name (i)]) <integer>
Minimum number of tesla lightning beams to create when creating an arc.
Max # of Beams ([todo internal name (i)]) <integer>
Maximum number of tesla lightning beams to create when creating an arc.
Min Beam Width ([todo internal name (i)]) <string>
Minimum width of the tesla lightning beams.
Max Beam Width ([todo internal name (i)]) <string>
Maximum width of the tesla lightning beams.
Min Time Visible ([todo internal name (i)]) <string>
Minimum lifetime of the tesla lightning beams.
Max Time Visible ([todo internal name (i)]) <string>
Maximum lifetime of the tesla lightning beams.
Min Time Between Arcs ([todo internal name (i)]) <string>
Minimum time delay between random arcing.
Max Time Between Arcs ([todo internal name (i)]) <string>
Maximum time delay between random arcing.
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.

Inputs

TurnOn
Turn emitter on.
TurnOff
Turn emitter off.
DoSpark
Force a single arc.


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