func_useableladder

From Valve Developer Community
< Zh
Jump to navigation Jump to search
English (en)中文 (zh)Translate (Translate)

func_useableladder是点实体 [en],可在所有的 起源 起源 游戏中使用。

C++ 类层级
CFuncLadder
↳CBaseEntity
C++ func_ladder.cpp

作为半2 [en]风格的梯子 [en]。可使玩家自动上/下梯,也可以使用+use手动爬上梯子(控制台指令,相当于按下控制键E)。

Note.png注意: 该实体仅在Half-Life 2 series Half-Life 2 series与传送门 传送门中有实际作用。若要了解其他游戏的梯子请参阅文章可用的梯子 [en]。
Warning.png混淆的风险:尽管带有前缀func_,然而这是一个点实体(前缀func_通常用于固体实体)。
Icon-Bug.png错误:似乎存在一个bug在一个trigger的空间内上下梯时会导致trigger发送输出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.

键值

Name [en] (targetname) <target_source>[ Edit ]
这个名称是其他实体通过 输入/输出 [en] 或其他 关键值 [en](如 parentname 或 target) 来引用该实体时使用的标识符。
该名称也会显示在 Hammer 编辑器的 2D 视图和 实体报告 [en] 中。
参见: 所有实体均可使用的 通用键值、输入与输出 [en]
Start (point0) <vec3 [en]>
梯子的起始点
End (point1) <vec3 [en]>
梯子的终止点
Surface properties (ladderSurfaceProperties) <字符串 [en]>
Start Disabled (StartDisabled) <布尔值 [en]>
保持休眠状态,直到被唤醒。(利用Enable输入)。

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.png示例: Used in 半衰期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 <void>
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