This article's documentation is for anything that uses the Source engine. Click here for more information.

Func useableladder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(35 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{wrongtitle|title=func_useableladder}}
{{LanguageBar}}
{{base_point}}
{{This is a|point entity|name=func_useableladder}}
{{CD|CFuncLadder|file1=1}}
It is a [[Half-Life 2]]-style [[ladder]]. Handles player auto mount/unmount, as well as +use to get onto the ladder.


==Entity Description==
{{note|This entity is functional only in {{hl2series|4}} and {{portal|4}}. See [[Working ladders]] for other games.}}
A Half-Life 2 ladder. Handles player auto mount/unmount, as well as +use to get onto the ladder.
{{func point ent}}
{{bug|There seems to be a bug where mounting or dismounting a ladder within a trigger volume will cause the trigger to fire outputs as if the player left and re-entered the volume. Seems to be because of how dismounting works, as it technically gives the player noclip temporarily, which makes the player not touch the trigger.}}


{{note|This entity is non-functional in [[Counter-Strike: Source]], [[Left4Dead]] or [[Team Fortress 2]]. Use [[func_ladder]] instead.}}
==Issues==
You should be sure, that ladder is not in contact with your brush if using it for ladder representation, otherwise it won't work.
[[File:Ladder1.jpg|right|150px|thumb|Usable ladder has a gap between itself and brush.]]


*See also [[info_ladder_dismount]] - An entity used to specify ladder auto-dismount points.
== Keyvalues ==
*See also [[ladder_simple]] - A prefab containing a simple ladder setup, [[Working Ladders]] - A wiki tutorial on how to construct ladders - and [http://twhl.co.za/mapvault_map.php?id=3898 A tutorial bsp and map for constructing ladders]
{{KV Targetname}}
{{KV|Start|intn=point0|vec3|Ladder start point}}
{{KV|End|intn=point1|vec3|Ladder end point}}
{{KV|Surface properties|intn=ladderSurfaceProperties|string}}
{{KV EnableDisable}}


{{in code|class=class_c_func_ladder.html CFuncLadder|file=func__ladder_8cpp-source.html func_ladder.cpp}}
== Flags ==
{{fl|1|Fake Ladder|Ladder serving for mount check which still fires the <code>OnPlayerGotOnLadder</code> output but won't actually put the player on the ladder
:{{example|Used in {{hl2}} <code>[[d2_coast_04]]</code> for the ladder leading to operable crane and uses <code>OnPlayerGotOnLadder</code> output to put player inside the crane}}}}


==Keyvalues==
== Inputs ==
*{{KV Targetname}}
{{I EnableDisable}}
*{{KV Parentname}}
*'''point0'''
:<vector> Ladder end point.
*'''point1'''
:<vector> Ladder end point.
*'''StartDisabled'''
:<choices> Start Disabled.
:{| class=standard-table
! Literal value || Description
|-
| 0 || No
|-
| 1 || Yes
|}


==Flags==
== Outputs ==
*1 : Fake Ladder
{{O|OnPlayerGotOnLadder|activator = this entity|caller=player that got on ladder|Fired whenever a player gets on this ladder.}}
{{O|OnPlayerGotOffLadder|activator = this entity|caller=player that got on ladder|Fired whenever a player gets off this ladder.}}


==Inputs==
== See also ==
*{{I Targetname}}
* {{ent|info_ladder_dismount}} - An entity used to specify ladder auto-dismount points.
*{{I Parentname}}
* [[ladder_simple]] - A prefab containing a simple ladder setup
*'''Enable'''
* [[Working Ladders]] - A wiki tutorial on how to construct ladders
:Enable this ladder.
* [http://twhl.co.za/mapvault_map.php?id=3898 A tutorial bsp and map for constructing ladders]
*'''Disable'''
:Disable this ladder.
 
==Outputs==
*{{O Targetname}}
*<code>OnPlayerGotOnLadder</code>
:Fired whenever a player gets on this ladder. {{PlCal}}
*<code>OnPlayerGotOffLadder'''</code>
:Fired whenever a player gets off this ladder. {{PlCal}}

Latest revision as of 13:06, 4 May 2025

English (en)Translate (Translate)

func_useableladder is a point entity available in all Source Source games.

C++ Class hierarchy
CFuncLadder
CBaseEntity
C++ func_ladder.cpp

It is a Half-Life 2-style ladder. Handles player auto mount/unmount, as well as +use to get onto the ladder.

Note.pngNote:This entity is functional only in Half-Life 2 series Half-Life 2 series and Portal Portal. See Working ladders for other games.
Warning.pngRisk of Confusion:This is a point entity despite the name starting with func_ (which is usually used for brush entities).
Icon-Bug.pngBug:There seems to be a bug where mounting or dismounting a ladder within a trigger volume will cause the trigger to fire outputs as if the player left and re-entered the volume. Seems to be because of how dismounting works, as it technically gives the player noclip temporarily, which makes the player not touch the trigger.  [todo tested in ?]

Issues

You should be sure, that ladder is not in contact with your brush if using it for ladder representation, otherwise it won't work.

Usable ladder has a gap between itself and brush.

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

Start (point0) <vector3>
Ladder start point
End (point1) <vector3>
Ladder end point
Surface properties (ladderSurfaceProperties) <string>
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

Fake Ladder : [1]
Ladder serving for mount check which still fires the OnPlayerGotOnLadder output but won't actually put the player on the ladder
PlacementTip.pngExample:Used in Half-Life 2 d2_coast_04 for the ladder leading to operable crane and uses OnPlayerGotOnLadder output to put player inside the crane

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

OnPlayerGotOnLadder
!activator = this entity
!caller = player that got on ladder
Fired whenever a player gets on this ladder.
OnPlayerGotOffLadder
!activator = this entity
!caller = player that got on ladder
Fired whenever a player gets off this ladder.

See also