Zh/Env entity maker: Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{lang|Env entity maker}}
{{lang|Env entity maker}}
{{更新}}
{{更新}}
{{点实体|env_entity_maker}} 它可以在<code>env_entity_maker</code>[[坐标]]上,生成一个指定的{{ent|point_template}}实体。 允许自动生成或者通过输入生成。
{{point_ent:zh|env_entity_maker}} 它可以在<code>env_entity_maker</code>[[Origin|坐标]]上,生成一个指定的{{ent|point_template}}实体。 允许自动生成或者通过输入生成。


{{代码定义|CEnvEntityMaker|env_entity_maker.cpp}}
{{代码定义|CEnvEntityMaker|env_entity_maker.cpp}}
Line 20: Line 20:
{{KV BaseEntity|css=1}}
{{KV BaseEntity|css=1}}


==Inputs==
==输入==
{{IO|ForceSpawn|Spawn an instance of the template at this origin and angle.}}
{{IO:zh|ForceSpawn|从模板中生成实例,位置是本实体坐标和方向。}}
{{IO|ForceSpawnAtEntityOrigin|param=target_destination|Spawn an instance of the template at the same origin and angles as a specified entity.}}
{{IO:zh|ForceSpawnAtEntityOrigin|param=实体目标名/target_destination|在指定实体上从模板中生成实例。}}
{{I BaseEntity|prel4d=1}}
{{I BaseEntity|prel4d=1}}


==Outputs==
==输出==
{{IO|OnEntitySpawned|Fired when an instance of the entity template has been spawned.}}
{{IO:zh|OnEntitySpawned|当实例成功生成时触发。}}
{{IO|OnEntityFailedSpawn|Fired when a <code>ForceSpawn</code> input failed to spawn the template, either due to lack of space or being in player's view, depending on the spawnflags.}}
{{IO:zh|OnEntityFailedSpawn|<code>ForceSpawn</code>输入失败时触发,取决于是否在flags,例如是否在玩家视线或者空间是否足够。}}
{{O BaseEntity|l4d=1}}
{{O BaseEntity:zh|l4d=1}}

Revision as of 01:34, 13 October 2019

English (en)Русский (ru)中文 (zh)Translate (Translate)
Info content.png
This page has not been fully translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
This notice is put here by LanguageBar template and if you want to remove it after updating the translation you can do so on this page.


起源 env_entity_maker是一个存在于所有的 起源 游戏的点实体。 它可以在env_entity_maker坐标上,生成一个指定的point_template实体。 允许自动生成或者通过输入生成。


待完善: This template is currently using deprecated suf or {{Lang}}-based translations. Please use the main {{Code class}} instead, which uses {{Autolang}}.

在源代码中,它由 class CEnvEntityMaker 代表,定义于 env_entity_maker.cpp


标志(Flags)

  • 1: Enable AutoSpawn - 当有足够的空间且玩家没看见时,产生模板(Template)。
  • 2: AutoSpawn: 等待实体被销毁。
  • 4: AutoSpawn: 哪怕玩家看得见,也会生成。
  • 8: ForceSpawn: 只有在足够的空间时,生成。
  • 16: ForceSpawn: 只有玩家没看见时,生成。

键值

Point_template To Spawn (EntityTemplate) ([todo internal name (i)]) <target_destination>
此处生成point_template的名字
PostSpawn Movement Speed (PostSpawnSpeed) ([todo internal name (i)]) <浮点型(en)>
所有实体生成后,每秒会往PostSpawn Movement Direction的方向上运动多少hammer units
PostSpawn Movement Direction (PostSpawnDirection) ([todo internal name (i)]) <angle(en)>
所有从模板中生成的实体都会往这个方向上移动。
PostSpawn Direction Variance (PostSpawnDirectionVariance) ([todo internal name (i)]) <浮点型(en)>
The PostSpawn Movement Direction may vary by this many degrees. 这是半径。
PostSpawn Inherit Angles (PostSpawnInheritAngles) ([todo internal name (i)]) <布尔值(en)>
如果是Yes,,则按parent(父实体)的角度给予角度的偏移。


输入

ForceSpawn
从模板中生成实例,位置是本实体坐标和方向。
ForceSpawnAtEntityOrigin <实体目标名/target_destination(en)>
在指定实体上从模板中生成实例。


输出

OnEntitySpawned
当实例成功生成时触发。
OnEntityFailedSpawn
ForceSpawn输入失败时触发,取决于是否在flags,例如是否在玩家视线或者空间是否足够。

Base/基础:

OnUser1 to OnUser4
这些输出将分别响应于 FireUser1FireUser4 输入。 详见 User Inputs and Outputs
OnKilled  (存在于 求生之路系列求生之路系列 之中)
当实体被Kill输入时响应此输出。