Vgui neurotoxin countdown: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Updated entity data style for consistency)
 
(19 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{portal series point|vgui_neurotoxin_countdown}}
{{CD|CNeurotoxinCountdown|neurotoxin_countdown.cpp}}
{{This is a|point entity|series=Portal|name=vgui_neurotoxin_countdown}} It is a neurotoxin countdown display. In ''Portal'', the time to countdown (in seconds) is set by using the {{ent|startneurotoxins}} console command. In ''Portal 2'', it is set with the countdown KeyValue.
{{note|''Portal 2'' does not automatically hurt/kill the player when the timer reaches 0. Use a {{ent|point_hurt}} instead.}}
{{bug|The game will crash on Linux if a timer attempts to display a very large value. Since large values such as <code>99999</code> are often used in {{portal|3}} to effectively disable neurotoxin, you will need to ensure the displays are always turned off while the value is this high.}}


==Entity Description==
== Keyvalues ==
Neurotoxin Countdown
 
==Keyvalues==
{{KV Targetname}}
{{KV Targetname}}
{{KV Angles}}
{{KV|Countdown|intn=countdown|integer|Time (in seconds) to countdown.|since={{P2}}}}
{{KV Parentname}}
{{KV|Panel width|intn=width|integer|Width of the panel in units.}}
{{KV|width|integer|Width of the panel in units.}}
{{KV|Panel height|intn=height|integer|Height of the panel in units.}}
{{KV|height|integer|Height of the panel in units.}}
 
==Inputs==
{{I Targetname}}
{{IO|Enable|Make slideshow visible.}}
{{IO|Disable|Make slideshow invisible.}}


==Outputs==
== Inputs ==
{{O Targetname}}
{{I|Enable|Make slideshow visible.}}
{{I|Disable|Make slideshow invisible.}}

Latest revision as of 17:07, 13 May 2025

C++ Class hierarchy
CNeurotoxinCountdown
CBaseEntity

vgui_neurotoxin_countdown is a point entity available in Portal series Portal series. It is a neurotoxin countdown display. In Portal, the time to countdown (in seconds) is set by using the startneurotoxins console command. In Portal 2, it is set with the countdown KeyValue.

Note.pngNote:Portal 2 does not automatically hurt/kill the player when the timer reaches 0. Use a point_hurt instead.
Icon-Bug.pngBug:The game will crash on Linux if a timer attempts to display a very large value. Since large values such as 99999 are often used in Portal to effectively disable neurotoxin, you will need to ensure the displays are always turned off while the value is this high.  [todo tested in ?]

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

Countdown (countdown) <integer> (in all games since Portal 2)
Time (in seconds) to countdown.
Panel width (width) <integer>
Width of the panel in units.
Panel height (height) <integer>
Height of the panel in units.

Inputs

Enable
Make slideshow visible.
Disable
Make slideshow invisible.