Template:I BaseNPC: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) mNo edit summary |
TomEdwards (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
:* <code>D_NU</code>: Neutral | :* <code>D_NU</code>: Neutral | ||
; <code>SetHealth <[[int]]></code> | ; <code>SetHealth <[[int]]></code> | ||
: Set | : 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. | ||
; <code>SetBodyGroup <int></code> | ; <code>SetBodyGroup <int></code> | ||
: HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing! | : HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing! | ||
; <code>physdamagescale <[[float]]></code> | ; <code>physdamagescale <[[float]]></code> | ||
: | : Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility. | ||
; <code>Ignite</code> | ; <code>Ignite</code> | ||
: Burst into flames! | : Burst into flames! | ||
Line 26: | Line 25: | ||
: Smash into pieces. If this is not possible, disappear. | : Smash into pieces. If this is not possible, disappear. | ||
; {{EP2 add|<code>BecomeRagdoll</code>}} | ; {{EP2 add|<code>BecomeRagdoll</code>}} | ||
: Become a ragdoll without removing yourself? | : Become a [[ragdoll]] without removing yourself? | ||
; <code>StartScripting</code> | ; <code>StartScripting</code> | ||
; <code>StopScripting</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> | ; <code>Assault <[[targetname]]></code> | ||
: Start an [[assault]]at the given rally point. | : Start an [[assault]] at the given rally point. | ||
; <code>SetSquad <string></code> | ; <code>SetSquad <string></code> | ||
: Set the name of this NPC's [[Squads|squad]]. It will be removed from any existing squad automatically. Leaving the parameter blank will remove the NPC from any existing squad. | : Set the name of this NPC's [[Squads|squad]]. It will be removed from any existing squad automatically. Leaving the parameter blank will remove the NPC from any existing squad. | ||
Line 40: | Line 38: | ||
: Clears out the NPC's knowledge of a named entity. | : Clears out the NPC's knowledge of a named entity. | ||
; <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. | ||
; <code>IgnoreDangerSounds <float></code> | ; <code>IgnoreDangerSounds <float></code> | ||
: Ignore danger sounds for the specified number of seconds. | : Ignore danger sounds for the specified number of seconds. | ||
Line 52: | Line 49: | ||
: Force the NPC to draw their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already drawn, or if the NPC doesn't use weapons. | : Force the NPC to draw their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already drawn, or if the NPC doesn't use weapons. | ||
; {{EP1 add|<code>ForceInteractionWithNPC <string></code>}} | ; {{EP1 add|<code>ForceInteractionWithNPC <string></code>}} | ||
: Force the NPC to use a dynamic interaction with another NPC. | : Force the NPC to use a dynamic interaction with another NPC. Parameter format is<code><targetname> <dynamic interaction></code>. | ||
; {{EP1 add|<code>UpdateEnemyMemory <targetname></code>}} | ; {{EP1 add|<code>UpdateEnemyMemory <targetname></code>}} | ||
: Update (or | : Update (or create) this NPC's memory of of the given entity. | ||
{{I RenderFields}} | {{I RenderFields}} | ||
{{I DamageFilter}} | {{I DamageFilter}} | ||
{{I ResponseContext}} | {{I ResponseContext}} | ||
{{I Shadow}} | {{I Shadow}} | ||
{{I Targetname}} | |||
}} | }} |
Revision as of 06:14, 20 July 2009
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 <int>
- HACK: Sets this NPC's body group (from 0 - n). You'd better know what you are doing!
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!
- Template:EP2 add
- Template:EP2 add
- Template:EP2 add
- ?
Break
- Smash into pieces. If this is not possible, disappear.
- Template:EP2 add
- Become a ragdoll without removing yourself?
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>
- Set the name of this NPC's squad. It will be removed from any existing squad automatically. 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)
- Force the NPC to holster their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already holstered, or if the NPC doesn't use weapons.
HolsterAndDestroyWeapon
(in all games since)
- Identical to HolsterWeapon, except the weapon is destroyed once it has been holstered and concealed.
UnholsterWeapon
(in all games since)
- Force the NPC to draw their weapon. Ignored if the NPC is scripting, if the NPC's weapon is already drawn, or if the NPC doesn't use weapons.
ForceInteractionWithNPC <string>
(in all games since)
- Force the NPC to use a dynamic interaction with another NPC. Parameter format is
<targetname> <dynamic interaction>
. UpdateEnemyMemory <targetname>
(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.