Game ui: Difference between revisions
Jump to navigation
Jump to search
Note:Unreliable in multiplayer.
m (Robot: fixing template case.) |
TomEdwards (talk | contribs) (cleaned) |
||
Line 1: | Line 1: | ||
{{ | {{toc-right}} | ||
{{base point|game_ui}} It redirects important player key presses to a series of outputs, and can be used to make the player control vehicles built in a map. It can be activated with I/O, or by the player looking at it. | |||
{{note|Unreliable in multiplayer.}} | |||
== Keyvalues == | == Keyvalues == | ||
; FieldOfView <code><[[float]]></code> | |||
: | : How close to the entity the player's crosshair must be for it to take control. When the player leaves the active zone, (s)he regains control. | ||
:* 1.0 = straight ahead | |||
:* 0.0 = +/- 90 degrees | |||
:* -1.0 = all directions | |||
{{KV Targetname}} | |||
== Flags == | == Flags == | ||
* | |||
* | * Freeze Player | ||
* | * Hide Weapon | ||
* | * +Use Deactivates | ||
* Jump Deactivates | |||
== Inputs == | == Inputs == | ||
; <code>Activate</code> | |||
: | ; <code>Deactivate</code> | ||
: The entity will only test FieldOfView if it is active. {{warning|Deactivating an already-inactive game_ui crashes the game!}} | |||
{{I Targetname}} | |||
== Outputs == | == Outputs == | ||
The player is always the [[!activator]]. | |||
; <code>PlayerOn</code> | |||
:Fired | ; <code>PlayerOff</code> | ||
:Fired when the entity starts or stops controlling the player's input. | |||
; <code>PressedMoveLeft</code> | |||
; {{EP2 add|<code>UnpressedMoveLeft</code>}} | |||
:Fired | : Fired on +moveleft/-moveleft | ||
; <code>PressedMoveRight</code> | |||
; {{EP2 add|<code>UnpressedMoveRight</code>}} | |||
: Fired on +moveright/-moveright | |||
:Fired | ; <code>PressedForward</code> | ||
; {{EP2 add|<code>UnpressedForward</code>}} | |||
: Fired on +forward/-forward | |||
; <code>PressedBack</code> | |||
:Fired | ; {{EP2 add|<code>UnpressedBack</code>}} | ||
: Fired on +back/-back | |||
; <code>PressedAttack</code> | |||
; {{EP2 add|<code>UnpressedAttack</code>}} | |||
:Fired | : Fired on +attack/-attack | ||
; <code>PressedAttack2</code> | |||
; {{EP2 add|<code>UnpressedAttack2</code>}} | |||
: Fired on +attack2/-attack2 | |||
:Fired | ; <code>XAxis <[[float]]></code> | ||
; <code>YAxis <float> </code> | |||
: Fired whenever the X/Y axis of the player's input changes. Only useful for analogue gamepad input. | |||
:* -1.0 = +moveleft / +back at 100% speed | |||
:Fired | :* 0 = no movement in this axis | ||
:* +1.0 = +moveright / +forward at 100% speed | |||
; <code>AttackAxis <float></code> | |||
; <code>Attack2Axis <float></code> | |||
:An output that fires whenever the state of the player's "attack" key changes. Only useful for analogue gamepad input. | |||
: | :* 1.0 = bumper is 100% depressed | ||
: | :* 0 = bumper is at rest | ||
* | {{O Targetname}} | ||
[[Category:Level Design]] | |||
:An output that fires whenever the state of the player's " | |||
:{{ |
Revision as of 06:00, 2 September 2009
Template:Base point It redirects important player key presses to a series of outputs, and can be used to make the player control vehicles built in a map. It can be activated with I/O, or by the player looking at it.

Keyvalues
- FieldOfView
<float>
- How close to the entity the player's crosshair must be for it to take control. When the player leaves the active zone, (s)he regains control.
- 1.0 = straight ahead
- 0.0 = +/- 90 degrees
- -1.0 = all directions
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Flags
- Freeze Player
- Hide Weapon
- +Use Deactivates
- Jump Deactivates
Inputs
Activate
Deactivate
- The entity will only test FieldOfView if it is active.
Warning:Deactivating an already-inactive game_ui crashes the game!
Outputs
The player is always the !activator.
PlayerOn
PlayerOff
- Fired when the entity starts or stops controlling the player's input.
PressedMoveLeft
- Template:EP2 add
- Fired on +moveleft/-moveleft
PressedMoveRight
- Template:EP2 add
- Fired on +moveright/-moveright
PressedForward
- Template:EP2 add
- Fired on +forward/-forward
PressedBack
- Template:EP2 add
- Fired on +back/-back
PressedAttack
- Template:EP2 add
- Fired on +attack/-attack
PressedAttack2
- Template:EP2 add
- Fired on +attack2/-attack2
XAxis <float>
YAxis <float>
- Fired whenever the X/Y axis of the player's input changes. Only useful for analogue gamepad input.
- -1.0 = +moveleft / +back at 100% speed
- 0 = no movement in this axis
- +1.0 = +moveright / +forward at 100% speed
AttackAxis <float>
Attack2Axis <float>
- An output that fires whenever the state of the player's "attack" key changes. Only useful for analogue gamepad input.
- 1.0 = bumper is 100% depressed
- 0 = bumper is at rest