Template:O BaseNPC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added to Output Templates category)
m (added language bar. also a lot of periods.)
Line 1: Line 1:
{{ScrollBox|title=BaseNPC|
{{lang|{{FULLPAGENAME}}}}[[Category:Output Templates|BaseNPC]]
{{IO|OnDamaged|Fired when this NPC takes damage {{activator|damage inflictor}}}}
{{tip|add {{para|noscroll|1}} to stop the template from scrolling. add {{para|nogames|1}} to hide OnKilled and OnFizzled.}}
{{IO|OnDeath|Fired when this NPC is killed {{activator|killer}}}}
<onlyinclude>{{ScrollBox|title=BaseNPC|noscroll={{{noscroll|}}}|
{{IO|OnHalfHealth|Fired when this NPC reaches half of its maximum health}}
{{IO|OnDamaged|Fired when this NPC takes damage {{activator|damage inflictor}}.}}
{{IO|OnHearWorld|Fired when this NPC hears a sound (other than combat or the player)}}
{{IO|OnDamagedByPlayer|Fired when this NPC is hurt by a player {{activator|attacker or vehicle driver [if friendly fire]}}.}}
{{IO|OnHearPlayer|Fired when this NPC hears the player}}
{{IO|OnDamagedByPlayerSquad|Fired when this NPC is hurt by a player OR by one of the player's squadmates {{activator|attacker or vehicle driver [if friendly fire]}}.}}
{{IO|OnHearCombat|Fired when this NPC hears combat sounds}}
{{IO|OnDeath|Fired when this NPC is killed {{activator|killer}}.}}
{{IO|OnFoundEnemy|Fired when this NPC establishes line of sight to its enemy|param=targetname}}
{{IO|OnDenyCommanderUse|Fired when this NPC has refused to join the player's squad.}}
{{IO|OnLostEnemyLOS|Fired when this NPC loses line of sight to its enemy}}
{{IO|OnForcedInteractionAborted|Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc.).}}
{{IO|OnLostEnemy|Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy}}
{{IO|OnFoundPlayer|Fired when this NPC establishes line of sight to its enemy, and that enemy is a player|param=targetname}}
{{IO|OnLostPlayerLOS|Fired when this NPC loses line of sight to its enemy, and that enemy is a player}}
{{IO|OnLostPlayer|Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy}}
{{IO|OnDamagedByPlayer|Fired when this NPC is hurt by a player {{activator|attacker or vehicle driver (if friendly fire)}}}}
{{IO|OnDamagedByPlayerSquad|Fired when this NPC is hurt by a player OR by one of the player's squadmates {{activator|attacker or vehicle driver (if friendly fire)}}}}
{{IO|OnDenyCommanderUse|Fired when this NPC has refused to join the player's squad}}
{{IO|OnSleep|Fired when this NPC enters a sleep state}}
{{IO|OnWake|Fired when this NPC comes out of a sleep state}}
{{IO|OnForcedInteractionStarted|Fired when the NPC starts a forced interaction.}}
{{IO|OnForcedInteractionStarted|Fired when the NPC starts a forced interaction.}}
{{IO|OnForcedInteractionAborted|Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc)}}
{{IO|OnForcedInteractionFinished|"NPCs in actbusies can no longer perform dynamic interactions." {{todo|What does this mean?}}}}
{{IO|OnForcedInteractionFinished|"NPCs in actbusies can no longer perform dynamic interactions." {{todo|What does this mean?}}}}
{{O Targetname}}
{{IO|OnHalfHealth|Fired when this NPC reaches half of its maximum health.}}
}}<noinclude>
{{IO|OnHearCombat|Fired when this NPC hears combat sounds.}}
[[Category:Output Templates|BaseNPC]]
{{IO|OnHearPlayer|Fired when this NPC hears the player.}}
</noinclude>
{{IO|OnHearWorld|Fired when this NPC hears a sound (other than combat or the player).}}
{{IO|OnFoundEnemy|Fired when this NPC establishes line of sight to its enemy.|param=targetname}}
{{IO|OnLostEnemy|Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.}}
{{IO|OnLostEnemyLOS|Fired when this NPC loses line of sight to its enemy.}}
{{IO|OnFoundPlayer|Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.|param=targetname}}
{{IO|OnLostPlayer|Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.}}
{{IO|OnLostPlayerLOS|Fired when this NPC loses line of sight to its enemy, and that enemy is a player.}}
{{IO|OnSleep|Fired when this NPC enters a sleep state.}}
{{IO|OnWake|Fired when this NPC comes out of a sleep state.}}
{{#if: {{{nogames|}}} | {{O BaseEntity}}
{{O BaseAnimating}}  | {{O BaseEntity|l4d=1}}
{{O BaseAnimating|portal2=1}} }}}}</onlyinclude>

Revision as of 14:13, 26 May 2022

Tip.pngTip:add |noscroll=1 to stop the template from scrolling. add |nogames=1 to hide OnKilled and OnFizzled.
BaseNPC:
OnDamaged
Fired when this NPC takes damage (!activator is the damage inflictor).
OnDamagedByPlayer
Fired when this NPC is hurt by a player (!activator is the attacker or vehicle driver [if friendly fire]).
OnDamagedByPlayerSquad
Fired when this NPC is hurt by a player OR by one of the player's squadmates (!activator is the attacker or vehicle driver [if friendly fire]).
OnDeath
Fired when this NPC is killed (!activator is the killer).
OnDenyCommanderUse
Fired when this NPC has refused to join the player's squad.
OnForcedInteractionAborted
Fired when the NPC aborts a forced interaction for some reason (target NPC died, couldn't be pathed to, etc.).
OnForcedInteractionStarted
Fired when the NPC starts a forced interaction.
OnForcedInteractionFinished
"NPCs in actbusies can no longer perform dynamic interactions."
Todo: What does this mean?
OnHalfHealth
Fired when this NPC reaches half of its maximum health.
OnHearCombat
Fired when this NPC hears combat sounds.
OnHearPlayer
Fired when this NPC hears the player.
OnHearWorld
Fired when this NPC hears a sound (other than combat or the player).
OnFoundEnemy <targetname>
Fired when this NPC establishes line of sight to its enemy.
OnLostEnemy
Fired when this NPC loses its enemy. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnLostEnemyLOS
Fired when this NPC loses line of sight to its enemy.
OnFoundPlayer <targetname>
Fired when this NPC establishes line of sight to its enemy, and that enemy is a player.
OnLostPlayer
Fired when this NPC loses its enemy, and that enemy was a player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
OnLostPlayerLOS
Fired when this NPC loses line of sight to its enemy, and that enemy is a player.
OnSleep
Fired when this NPC enters a sleep state.
OnWake
Fired when this NPC comes out of a sleep state.
Note.pngNote:Content moved to Rendering and studio model related KIO/Outputs for continuation of page history