This article relates to the game "Portal 2." Click here for more information.

comp_flicker

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Comp flicker.png

comp_flicker is an internal point entity available in Strata Source Strata Source and TeamSpen's Hammer Addons TeamSpen's Hammer Addons.

Upon activation, it repeatedly changes a models skin to on/off values for a set amount of time, used to simulate flickering lights.


Keyvalues

BaseEntityPoint:
Name (targetname) <string>
The name that other entities refer to this entity by.
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.
Pitch Yaw Roll (X Y Z) (angle) <angles>
This entity's orientation in the world. Roll is the rotation around the X axis, pitch is rotation around the Y axis and yaw is the rotation around the Z axis.
Parent (parentname) <targetname>
The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
Attachment Point (parent_attachment_point) <string>
If set, attach to this attachment point on the parent during spawn.
Model to Control (target_mdl) <targetname>
An entity which will have skins swapped to turn on/off.
On Skin (mdl_skin_on) <integer>
The 'on' skin for the model.
Off Skin (mdl_skin_off) <integer>
The 'off' skin for the model.
Total Time (total_time) <float>
The overall time taken to complete the on or off flicker.
Flicker Min (flicker_min) <float>
The delay used at the start of the on cycle, or at the end of the off cycle.
Flicker Max (flicker_max) <float>
The delay used at the end of the on cycle, or at the start of the off cycle.
Variance (variance) <float>
Random variance added/subtracted for each delay.

Inputs

BaseEntityIO:
Kill
Removes this entity from the world.
KillHierarchy
Removes this entity and all its children from the world.
AddOutput <string>
Adds an entity I/O connection to this entity or changes keyvalues dynamically. Format:\n'<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 equals infinite, 1 equals only once)'\nor 'keyvalue newval'. Very dangerous, use with care.
FireUser1 to FireUser4
Causes this entity's OnUser output to be fired.
Use
Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input.
DispatchEffect <string>
Dispatch an effect from the entity's origin. See List of Client Effects
BaseEntityPoint:
SetParent <targetname>
Changes the entity's parent in the movement hierarchy.
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
SetParentAttachmentMaintainOffset <string>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
TurnOn
Turn the target entities on.
TurnOff
Turn the target entities off.
FlickerOn
Flicker the target gradually on.
FlickerOff
Flicker the target gradually off.

Outputs

OnTurnedOn
Fired when the target should turn on.
OnTurnedOff
Fired when the target should turn off.
OnFlickerOnStart
Fired after the flicker on effect has started.
OnFlickerOffStart
Fired after the flicker off effect has started.
OnFlickerOnEnd
Fired after the flicker on effect has finished.
OnFlickerOffEnd
Fired after the flicker off effect has finished.

See also