Template:I BaseNPC: Difference between revisions
Jump to navigation
Jump to search
Chainmanner (talk | contribs) (The BecomeRagdoll input DOES remove the original entity.) |
(Forwards compatability(via Template:IO) and minor changes.) |
||
Line 1: | Line 1: | ||
{{ScrollBox|title=BaseNPC| | {{ScrollBox|title=BaseNPC| | ||
{{IO|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 <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}} | ||
{{IO|SetHealth <[[int]]>|Set the NPC's health.}} | |||
; {{EP2 add|<code>AddHealth <[[int]]></code>}} | ; {{EP2 add|<code>AddHealth <[[int]]></code>}} | ||
; {{EP2 add|<code>RemoveHealth <[[int]]></code>}} | ; {{EP2 add|<code>RemoveHealth <[[int]]></code>}} | ||
: Add to or remove from the NPC's health. | : Add to or remove from the NPC's health. | ||
{{IO|SetBodyGroup|HACK: Sets this NPC's body group (from 0 - n).|param=int}} | |||
: Sets this NPC's body group (from 0 - n). | {{IO|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|Ignite|Burst into flames.}} | |||
{{IO|IgniteLifetime|Ignite for the given number of seconds.|param=float}} | |||
{{IO|IgniteNumHitboxFires|Ignite with the given number of [[hitbox]] fires.|param=int}} | |||
{{IO|IgniteHitboxFireScale|Ignite with the given hitbox fire scale.|param=float}} | |||
{{IO|Break|Smash into pieces. If this is not possible, disappear.}} | |||
{{IO|{{EP2 add|BecomeRagdoll}}|Remove itself and instantly become a [[ragdoll]] with zero force (just go limp). OnDeath, etc. Outputs will <strong>NOT</strong> be fired.}} | |||
;<code> StartScripting</code> | |||
;<code>StopScripting</code> | |||
; <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. | : 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. | ||
{{IO|Assault|Start an [[assault]] at the given rally point.|param=targetname}} | |||
{{IO|SetSquad|Change the name of this NPC's [[Squads|squad]]. Leaving the parameter blank will remove the NPC from any existing squad.|param=string}} | |||
{{IO|Wake|Wakes up the NPC if it is sleeping.}} | |||
{{IO|ForgetEntity|Clears out the NPC's knowledge of a named entity.|param=targetname}} | |||
; <code>GagEnable</code> | ; <code>GagEnable</code> | ||
; <code>GagDisable</code> | ; <code>GagDisable</code> | ||
: Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene. | : Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene. | ||
{{IO|IgnoreDangerSounds|Ignore danger sounds for the specified number of seconds.|param=float}} | |||
; {{EP1 add|<code>HolsterWeapon</code>}} | ; {{EP1 add|<code>HolsterWeapon</code>}} | ||
; {{EP1 add|<code>UnholsterWeapon</code>}} | ; {{EP1 add|<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. | : Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons. | ||
{{IO|{{EP1 add|HolsterAndDestroyWeapon}}|As <code>HolsterWeapon</code>, except the weapon is destroyed once it has been concealed.}} | |||
{{IO|{{EP1 add|ForceInteractionWithNPC <[[string]]>}}|Force the NPC to use a dynamic interaction with another NPC. Syntax is <code><[[targetname]]> <dynamic interaction></code>.|param=string}} | |||
{{IO|{{EP1 add|UpdateEnemyMemory}}|Update (or create) this NPC's memory of of the given entity.}} | |||
{{I RenderFields}} | {{I RenderFields}} | ||
{{I DamageFilter}} | {{I DamageFilter}} |
Revision as of 06:45, 18 June 2016
BaseNPC:
- 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
: HateD_FR
: FearD_LI
: LikeD_NU
: Neutral
- SetHealth <int>
- Set the NPC's health.
- Template:EP2 add
- Template:EP2 add
- Add to or remove from the NPC's health.
- SetBodyGroup <integer>
- HACK: Sets this NPC's body group (from 0 - n).
- physdamagescale <float>
- Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.
- Ignite
- Burst into flames.
- IgniteLifetime <float>
- Ignite for the given number of seconds.
- IgniteHitboxFireScale <float>
- Ignite with the given hitbox fire scale.
- Break
- Smash into pieces. If this is not possible, disappear.
- Template:EP2 add
- Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. Outputs will NOT be fired.
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 NPC's idle speech, and so on.
- Assault <targetname>
- Start an assault at the given rally point.
- SetSquad <string>
- Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
- Wake
- Wakes up the NPC if it is sleeping.
- ForgetEntity <targetname>
- Clears out the NPC's knowledge of a named entity.
GagEnable
GagDisable
- Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
- IgnoreDangerSounds <float>
- Ignore danger sounds for the specified number of seconds.
HolsterWeapon
(in all games since)
UnholsterWeapon
(in all games since)
- 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
)
- As
HolsterWeapon
, except the weapon is destroyed once it has been concealed.
- ForceInteractionWithNPC <string> (in all games since
) <string>
- Force the NPC to use a dynamic interaction with another NPC. Syntax is
<targetname> <dynamic interaction>
.
- UpdateEnemyMemory (in all games since
)
- Update (or create) this NPC's memory of of the given entity.
RenderFields:
- Alpha <integer 0–255>
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its
rendermode
set to a number other than0
.
- Color <color255>
- Sets an RGB color for the entity.
DamageFilter:
- SetDamageFilter <string>
- Sets the entity to use as damage filter. Pass in an empty string (no parameter) to clear the damage filter.
ResponseContext:
- AddContext <string>
- Adds to the entity's list of response contexts. Format is
<key>:<value>
.
- RemoveContext <string>
- Remove a context from this entity's list. The name should match the key of an existing context.
- ClearContext
- Removes all contexts from this entity's list.
Shadow:
- DisableShadow
- Turn dynamic shadows off for this entity. Identical to applying EF_NOSHADOW.
- EnableShadow
- Turn dynamic shadows on for this entity.
- DisableReceivingFlashlight (in all games since
)
- This object will not receive light or shadows from projected textures.
- EnableReceivingFlashlight (in all games since
)
- This object may receive light or shadows from projected textures.