Template:I BaseNPC: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (Forwards compatability(via Template:IO) and minor changes.)  | 
				 (fixed the formatting issue on BecomeRagdoll where the "(New with Source 2007)" text was in the wrong font.)  | 
				||
| Line 17: | Line 17: | ||
{{IO|IgniteHitboxFireScale|Ignite with the given hitbox fire scale.|param=float}}  | {{IO|IgniteHitboxFireScale|Ignite with the given hitbox fire scale.|param=float}}  | ||
{{IO|Break|Smash into pieces. If this is not possible, disappear.}}  | {{IO|Break|Smash into pieces. If this is not possible, disappear.}}  | ||
{{IO  | {{IO|BecomeRagdoll|Remove itself and instantly become a [[ragdoll]] with zero force (just go limp). OnDeath, etc. Outputs will <strong>NOT</strong> be fired.|since=EP2}}  | ||
;<code> StartScripting</code>  | ;<code> StartScripting</code>  | ||
;<code>StopScripting</code>  | ;<code>StopScripting</code>  | ||
Revision as of 21:41, 27 May 2018
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 
dispositionare: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.
 
- BecomeRagdoll   (in all games since 
) - Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. Outputs will NOT be fired.
 StartScriptingStopScripting- 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.
 GagEnableGagDisable- 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 
rendermodeset 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.