info_hlvr_equip_player

From Valve Developer Community
Jump to: navigation, search

info_hlvr_equip_player is a point entity available in Half-Life: Alyx Half-Life: Alyx. 用于为HLVR玩家装备武器或物品。

Keyvalues

equip_on_mapstart (???) <boolean>
地图开始时装备(默认: 1)


energygun (???) <boolean>
给手枪
shotgun (???) <boolean>
给霰弹枪
rapidfire (???) <boolean>
给冲锋枪
multitool (???) <boolean>
给多工具
flashlight (???) <boolean>
给手电筒
flashlight_enabled (???) <boolean>
开启手电
grabbitygloves (???) <boolean>
给抓取手套
itemholder (???) <boolean>
给物品架
set_ammo (???) <integer>
设置手枪弹药 (-1 to leave it)
set_ammo_rapidfire (???) <integer>
设置冲锋枪弹药 (-1 to leave it). 需要为90的倍数
set_ammo_shotgun (???) <integer>
设置霰弹枪弹药 (-1 to leave it)
set_resin (???) <integer>
设置树脂 (-1 to leave it)
start_weapons_empty (???) <boolean>
起始武器为空
inventory_enabled (???) <boolean>
启动物品栏(武器转换)
backpack_enabled (???) <boolean>
启动背包
allow_removal (???) <boolean>
进行删除。如果启动,将删除玩家未被info_hlvr_equip_player标记的装备

手枪升级:
pistol_upgrade_lasersight (???) <boolean>
手枪 升级激光指示器
pistol_upgrade_reflexsight (???) <boolean>
手枪 升级反射瞄准镜
pistol_upgrade_bullethopper (???) <boolean>
手枪 升级弹匣容量
pistol_upgrade_burstfire (???) <boolean>
手枪 升级爆炸开火

冲锋枪升级:
rapidfire_upgrade_reflexsight (???)
冲锋枪 升级反射瞄准镜
rapidfire_upgrade_lasersight (???)
冲锋枪 升级激光指示器
rapidfire_upgrade_extended_magazine (???)
冲锋枪 升级弹匣容量

霰弹枪升级:
shotgun_upgrade_autoloader (???)
霰弹枪 升级自动添弹器
shotgun_upgrade_grenade (???)
霰弹枪 升级榴弹发射器
shotgun_upgrade_lasersight (???)
霰弹枪 升级激光指示器
shotgun_upgrade_quickfire (???)
霰弹枪 升级快速开火

Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.

目标名称:
Name (???)
用于其他实体引用的实体目标名称。
Entity Scripts (???)
生成所有实体后执行的VScript文件(不带文件扩展名)的空格分隔列表。所有脚本都在相一脚本作用域内执行,后面的脚本会覆盖任何相同的变量和函数。

Inputs

EquipNow
为HLVR玩家配备选定的物品。
EnableInventory
启用HLVR玩家的物品栏(武器开关)。
EnableBackpack
启动HLVR玩家的背包

VScript:
RunScriptFile <string>
加载并执行脚本文件。
RunScriptCode <string>
执行一段脚本代码。
CallScriptFunction <string>
调用脚本函数。
CallPrivateScriptFunction <string>
调用实体私有的脚本函数。
CallGlobalScriptFunction <string>
调用全局脚本函数。



Base:
AddContext <string>
Adds to the entity's list of response contexts. See Context.
AddOutput <string>
Assigns a new keyvalue/output on this entity. For keyvalues, some rely on extra necessary code to be ran and won't work if its simply just changed through this input. There is a strict format that must be followed:
// Format of changing KeyValues: "AddOutput [key] [value]"
//// Raw text:
"OnUser1" "!self,AddOutput,targetname new_name"

// Format of adding an Output: "AddOutput {targetname}:{inputname}:{parameter}:{delay}:{max times to fire, -1 means infinite}"
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:SetParent:!activator:0.0:-1"
// Arguments can be left blank, but the empty blank should still be contained.
//// Raw text:
"OnUser1" "!self,AddOutput,OnUser1:ClearParent::0.0:-1"
ClearContext
Removes all contexts from this entity's list.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.
FireUser1 to FireUser4
Fires the respectiveOnUseroutputs; see User Inputs and Outputs.
Kill
Removes this entity and any entities parented to it from the world.
KillHierarchy
Functions the same as Kill, although this entity and any entities parented to it are killed on the same frame, being marginally faster thanKillinput.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
SetParent <string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
Use  !FGD
Same as a player invoking +use; no effect in most cases.
DispatchResponse <string> !FGD
Dispatches a response to the entity. See Response and Concept.
DispatchEffect <string> (removed since Left 4 Dead) !FGD
Dispatches a special effect from the entity's origin; See also List of Client Effects. Replaced by the particle system since Left 4 Dead.
RunScriptFile <script> (in all games since Left 4 Dead 2) (also in Team Fortress 2)
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since Left 4 Dead 2) (also in Team Fortress 2)
Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console.
Icon-Bug.pngBug:In Hammer, using string arguments will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.
Note.pngFix:Remove the string argument manually with a text editor.
Note.pngNote:Team Fortress 2 Backtick characters ` are replaced with quotation marks at runtime, allowing quotation marks to be used when normally not possible.
CallScriptFunction <string> (in all games since Left 4 Dead 2) (also in Team Fortress 2) !FGD
Calls a VScript function defined in the scope of the receiving entity.
TerminateScriptScope  (only in Team Fortress 2) !FGD
Destroys the script scope of the receving entity.
SetLocalOrigin <coordinates> (in all games since Alien Swarm) !FGD
Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
SetLocalAngles <angles> (in all games since Alien Swarm) !FGD
Set this entity's angles.

目标名称:
Kill
从世界中移出除此实体。
KillHierarchy
将此实体及其子项从世界中移除。PS:移除实体时已删除孤立的子项,但本项会删除同一帧上所有子项,速度略快于 Kill。
AddOutput <string>
将键值 keyvalue/output 添加到此实体。它可能非常危险,请小心使用。
FireUser1 to FireUser4
触发脱出。
Use  !FGD
与玩家调用 +use 相同;根据实体的不同,可能不会做任何事。也可以通过触发未指定输入的输出来调用。
RunScriptFile <script>
从磁盘执行 VScript 文件,不带文件扩展名。脚本内容与接收实体的脚本作用域合并。
RunScriptCode <string>
接收输入的实体的作用域中执行 VScript 源代码字符串。通过控制台触发时可能需要字符串引号。警告:切勿尝试将字符串参数传递给具有此输入的脚本函数。由于嵌套引号,它将损坏 VMF 结构,然后必须使用文本编辑器手动删除该引号。
CallScriptFunction <string>
在接收实体的作用域中执行 VScript 函数。
SetLocalOrigin <coordinates>
将此实体发送到地图中的某个点。如果实体的父级为某物,则作用于父实体。
SetLocalAngles <angles>
设置此实体的角度。

Outputs


Targetname:
OnUser1 to OnUser4
These outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled  (only in Left 4 Dead)
This output fires when the entity is killed and removed from the game.

目标名称:
OnUser1 to OnUser4
当相应的 Input 编号触发时响应。
OnKilled
当实体被杀死并从游戏中移除时,此 output 将触发。