Template:I BaseNPC:ru: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(updated template usage. barely translated.)
Line 1: Line 1:
{{ScrollBox|title=BaseNPC|
{{lang|Template:I BaseNPC}}
; <code>SetRelationship <[[string]]&#124;[[targetname]] or [[classname]]> <string&#124;disposition> <[[int]]&#124;rank></code>
{{translate:ru}}
: Changes whether this NPC likes or dislikes certain others. Used like the [[ai_relationship]] entity, with this NPC as the subject.
<onlyinclude>{{ScrollBox|title=BaseNPC|noscroll={{{noscroll|}}}|
{{IO:ru|AddHealth|param=int|since={{hl2ep2|suf=:ru}}}}
{{IO:ru|RemoveHealth|Add to or remove from the NPC's health.|param=int|since={{hl2ep2|suf=:ru}}}}
{{IO:ru|SetHealth|Set the NPC's health.|param=int}}
{{IO:ru|Break|Smash into pieces. If this is not possible, disappear.}}
{{IO:ru|BecomeRagdoll|Remove itself and instantly become a [[ragdoll]] with zero force (just go limp). OnDeath, etc. outputs will <strong>NOT</strong> be fired.|since={{hl2ep2|suf=:ru}}}}
{{IO:ru|ForceInteractionWithNPC  <[[string:ru|строка]]> <строка>|Force the NPC to use a dynamic interaction with another NPC. Syntax is <tt><[[targetname:ru|targetname]]> <dynamic interaction></tt>.|since={{hl2ep1|suf=:ru}}}}
{{IO:ru|ForgetEntity|Clears out the NPC's knowledge of a named entity.|param=targetname}}
{{IO:ru|UpdateEnemyMemory|Update (or create) this NPC's memory of of the given entity.|since={{hl2ep1|suf=:ru}}}}
{{IO:ru|GagEnable}}
{{IO:ru|GagDisable|Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.}}
{{IO:ru|HolsterWeapon|since={{hl2ep1|suf=:ru}}}}
{{IO:ru|UnholsterWeapon|Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.|since={{hl2ep1|suf=:ru}}}}
{{IO:ru|HolsterAndDestroyWeapon|Same as <tt>HolsterWeapon</tt>, except the weapon is destroyed once it has been concealed.|since={{hl2ep1|suf=:ru}}}}
{{IO:ru|IgnoreDangerSounds|Ignore danger sounds for the specified number of seconds.|param=float}}
{{IO:ru|physdamagescale|Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.|param=float}}
{{IO:ru|SetBodyGroup|HACK: Sets this NPC's body group (from 0–n).|param=int}}{{#ifeq: base | {{{branch|base}}} |
{{IO:ru|SetMaxLookDistance|Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.|param=float|only={{gmod|suf=:ru}}}} }}
{{IO:ru|SetRelationship <[[string]]{{!}}[[targetname]] or [[classname]]> <[[string]]{{!}}disposition> <[[int]]{{!}}rank>|Changes whether this NPC likes or dislikes certain others. Used like the {{ent:ru|ai_relationship}} entity, with this NPC as the subject.
: Values for <code>disposition</code> are:
: Values for <code>disposition</code> are:
:* <code>D_HT</code>: Hate
:* <code>D_HT</code>: Hate
:* <code>D_FR</code>: Fear
:* <code>D_FR</code>: Fear
:* <code>D_LI</code>: Like
:* <code>D_LI</code>: Like
:* <code>D_NU</code>: Neutral
:* <code>D_NU</code>: Neutral}}
; <code>SetHealth <[[int]]></code>
{{IO:ru|SetSquad|Change the name of this NPC's [[Squads|squad]]. Leaving the parameter blank will remove the NPC from any existing squad.|param=string}}
: Set the NPC's health.
{{IO:ru|StartScripting}}
; {{EP2 add:ru|<code>AddHealth <[[int]]></code>}}
{{IO:ru|StopScripting|Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore {{ent:ru|use|alt=+Use}}, don't idle speak or respond to other NPCs' idle speech, and so on.}}
; {{EP2 add:ru|<code>RemoveHealth <[[int]]></code>}}
{{IO:ru|Wake|Wakes up the NPC if it is sleeping.}}
: Add to or remove from the NPC's health.
{{#switch: {{{branch}}}
; <code>SetBodyGroup <[[int]]></code>
|base={{I BaseEntity:ru|noscroll=1|base=1}}
: Sets this NPC's body group (from 0 - n).
{{I BaseAnimating|noscroll=1|tf2=1|portal2=}}
; <code>physdamagescale <[[float]]></code>
|l4d={{I BaseEntity:ru|noscroll=1|l4d2=1}}
: Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.
{{I BaseAnimating|noscroll=1|tf2=|portal2=}}
; <code>Ignite</code>
|as={{I BaseEntity:ru|noscroll=1|as=1}}
: Burst into flames.
{{I BaseAnimating|noscroll=1|tf2=|portal2=}}
; <code>IgniteLifetime <[[float]]></code>
|portal2={{I BaseEntity:ru|noscroll=1|as=1}}
: Ignite for the given number of seconds.
{{I BaseAnimating|noscroll=1|portal2=1|tf2=}}
; <code>IgniteNumHitboxFires <[[int]]></code>
|{{I BaseEntity:ru|noscroll=1}}
: Ignite with the given number of [[hitbox]] fires.
{{I BaseAnimating|noscroll=1}} }}
; <code>IgniteHitboxFireScale <[[float]]></code>
{{I DamageFilter:ru}} }}</onlyinclude>
: Ignite with the given hitbox fire scale.
; <code>Break</code>
: Smash into pieces. If this is not possible, disappear.
; {{EP2 add:ru|<code>BecomeRagdoll</code>}}
: Become a [[ragdoll]] without removing yourself?
; <code>StartScripting</code>
; <code>StopScripting</code>
: Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +USE, don't idle speak or respond to other NPC's idle speech, and so on.
; <code>Assault <[[targetname]]></code>
: Start an [[assault]] at the given rally point.
; <code>SetSquad <[[string]]></code>
: Change the name of this NPC's [[Squads|squad]].  Leaving the parameter blank will remove the NPC from any existing squad.
; <code>Wake</code>
: Wakes up the NPC if it is sleeping.
; <code>ForgetEntity <[[targetname]]></code>
: Clears out the NPC's knowledge of a named entity.
; <code>GagEnable</code>
; <code>GagDisable</code>
: Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
; <code>IgnoreDangerSounds <[[float]]></code>
: Ignore danger sounds for the specified number of seconds.
; {{EP1 add:ru|<code>HolsterWeapon</code>}}
; {{EP1 add:ru|<code>UnholsterWeapon</code>}}
: Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
; {{EP1 add:ru|<code>HolsterAndDestroyWeapon</code>}}
: As <code>HolsterWeapon</code>, except the weapon is destroyed once it has been concealed.
; {{EP1 add:ru|<code>ForceInteractionWithNPC <[[string]]></code>}}
: Force the NPC to use a dynamic interaction with another NPC. Syntax is <code><[[targetname]]> <dynamic interaction></code>.
; {{EP1 add:ru|<code>UpdateEnemyMemory <[[targetname]]></code>}}
: Update (or create) this NPC's memory of of the given entity.
{{I RenderFields:ru}}
{{I DamageFilter:ru}}
{{I ResponseContext:ru}}
{{I Shadow:ru}}
{{I Targetname:ru}}
}}

Revision as of 17:55, 20 October 2022

Template:Translate:ru

BaseNPC:
AddHealth <integer> (in all games since Half-Life 2: Episode Two)
RemoveHealth <integer> (in all games since Half-Life 2: Episode Two)
Add to or remove from the NPC's health.
SetHealth <integer>
Set the NPC's health.
Break
Smash into pieces. If this is not possible, disappear.
BecomeRagdoll  (in all games since Half-Life 2: Episode Two)
Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. outputs will NOT be fired.
ForceInteractionWithNPC <строка> <строка>  (in all games since Half-Life 2: Episode One)
Force the NPC to use a dynamic interaction with another NPC. Syntax is <targetname> <dynamic interaction>.
ForgetEntity <targetname>
Clears out the NPC's knowledge of a named entity.
UpdateEnemyMemory  (in all games since Half-Life 2: Episode One)
Update (or create) this NPC's memory of of the given entity.
GagEnable
GagDisable
Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
HolsterWeapon  (in all games since Half-Life 2: Episode One)
UnholsterWeapon  (in all games since Half-Life 2: Episode One)
Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
HolsterAndDestroyWeapon  (in all games since Half-Life 2: Episode One)
Same as HolsterWeapon, except the weapon is destroyed once it has been concealed.
IgnoreDangerSounds <float>
Ignore danger sounds for the specified number of seconds.
physdamagescale <float>
Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.
SetBodyGroup <integer>
HACK: Sets this NPC's body group (from 0–n).
SetMaxLookDistance <float> (only in Garry's Mod)
Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.
SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
SetSquad <string>
Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
StartScripting
StopScripting
Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +Use, don't idle speak or respond to other NPCs' idle speech, and so on.
Wake
Wakes up the NPC if it is sleeping.
Основные:
Kill
Удаляет этот объект и все связанные с ним дочерние объекты из мира.
KillHierarchy
Функционирует так же, как Kill, хотя этот объект и любые связанные с ним объекты уничтожаются в одном кадре, что немного быстрее.
SetParent <string>
Двигаться с этим объектом. Смотрите Иерархия объектов.
SetParentAttachment <string>
Изменить этот объект, чтобы присоединить его к определённой точке крепления его предка. Объект будет перемещён к предку, чтобы положение его кости bone совпадало с положением крепления. Объекты должны быть соединены перед использованием этого ввода.
SetParentAttachmentMaintainOffset <string>
Как и приведённое выше, но без перемещения. Объект сохраняет свою позицию относительно крепления во время получения ввода.
ClearParent
Удаляет этот объект из иерархии движений, оставляя его свободным для самостоятельного перемещения.
AddOutput <string>
Оценивает ключевое значение/вывод для этого объекта.
Формат: <key> <value>
Формат: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
FireUser1 to FireUser4
Срабатывает OnUser выходы; Смотрите Пользовательские Входы и выходы.
Use  !FGD
То же, что игрок, вызывающий +use; может ничего не делать. Может также вызываться путем создания вывода, в котором не указан ввод.
Этот ввод не включен в Valve FGD.
DispatchEffect <string> !FGD
Отправляет специальный эффект от позиции объекта. Удалено и полностью заменено системой частиц, так как Left 4 Dead.
DispatchResponse <string> !FGD
Отправляет ответ объекту. Смотрите Response, а также Concept.
AddContext <string>
Добавляет в список объекта response contexts. Формат <key>:<value>.
RemoveContext <string>
Remove a context from this entity's list. The name should match the key of an existing context.
ClearContext <string>
Removes all contexts from this entity's list.
RunScriptFile <script> (in all games since Left 4 Dead 2)
Выполняет VScript скрипт файл с носителя, указывается без расширения. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string> (in all games since Left 4 Dead 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 Left 4 Dead 2 Left 4 Dead 2, the code is executed in the script scope of the entity that fires the output, not the one receiving the input.  [todo tested in ?]
Warning.pngWarning:Never try to pass строка parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
CallScriptFunction <string> (in all games since Left 4 Dead 2) !FGD
Execute a VScript function in the scope of the receiving 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
Устанавливает углы ориентации объекта.
Note.pngNote:Content moved to Rendering and studio model related KIO/Inputs for continuation of page history
DamageFilter:
SetDamageFilter <string>
Sets the entity to use as damage filter. Pass in an empty string ("") to clear the damage filter.