Npc zombie prone: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Removed a double link.)
m (Unicodifying, replaced: External Links → External links, See Also → See also, [[Image: → [[File:)
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{wrongtitle|title=npc_zombie_prone}}
{{DISPLAYTITLE:npc_zombie_prone}}


[[Image:Prefab npc_zombie_prone.jpg|thumb|250px|right|An npc_zombie_prone prefab.]]
[[File:Prefab npc_zombie_prone.jpg|thumb|250px|right|An npc_zombie_prone prefab.]]


A [[prefab]] located in the ''Prefabs HL2'' folder, containing a script setup that will handle a seemingly dead zombie rise from lying on the ground if the player approaches it.
A [[prefab]] located in the ''Prefabs HL2'' folder, containing a script setup that will handle a seemingly dead zombie rise from lying on the ground if the player approaches it.
Line 8: Line 8:
* An [[npc_zombie]] NPC to be used.
* An [[npc_zombie]] NPC to be used.
* A [[scripted_sequence]], with its ''Target NPC'' keyvalue set to the name of the zombie, that will animate the rise of the zombie.
* A [[scripted_sequence]], with its ''Target NPC'' keyvalue set to the name of the zombie, that will animate the rise of the zombie.
* [[logic_relay]] entity that when triggered will kill the trigger the rising sequence.
* [[logic_relay]] entity that when triggered will kill the trigger and start the rising sequence
* A [[trigger_once]] brush that will trigger the relay.
* A [[trigger_once]] brush that will trigger the relay.


Line 33: Line 33:




==See also==
* The [[npc_zombie_slump]] prefab - a prefab with the zombie starting out in a sitting pose.
<!-- SDK nuts has closed. When (and if) these tutorials are ported onto the VDC, please link to them instead!
==External links==
* Custom scene for [http://www.sdknuts.net/akg/tutorials/wiseSeq.asp Slump Rise]
-->
[[Category:Prefabs]]
[[Category:Prefabs]]

Latest revision as of 00:15, 7 January 2024


An npc_zombie_prone prefab.

A prefab located in the Prefabs HL2 folder, containing a script setup that will handle a seemingly dead zombie rise from lying on the ground if the player approaches it.

This prefab contains the following:

  • An npc_zombie NPC to be used.
  • A scripted_sequence, with its Target NPC keyvalue set to the name of the zombie, that will animate the rise of the zombie.
  • logic_relay entity that when triggered will kill the trigger and start the rising sequence
  • A trigger_once brush that will trigger the relay.

Damaging the lying zombie will also trigger the sequence, but killing it will not.


The I/O traffic is a little more confusing than it has to be, so here is a simpler, optimized version that works just as well:

1. Delete the logic_relay.

2. Set up the Outputs of the npc_zombie like this:

My output Target entity Target input Parameter Delay Only once Comments
Entity-output-icon.png OnDamaged npc_zombie_prone_1_stand_trigger Kill 0.00 Yes
Entity-output-icon.png OnDamaged npc_zombie_prone_1_ss BeginSequence 0.00 Yes
Entity-output-icon.png OnDeath npc_zombie_prone_1_ss Kill 0.00 Yes

3. Set up the Outputs of the trigger_once like this:

My output Target entity Target input Parameter Delay Only once Comments
Entity-output-icon.png OnTrigger npc_zombie_prone_1_ss BeginSequence 0.00 Yes


See also

  • The npc_zombie_slump prefab - a prefab with the zombie starting out in a sitting pose.