WiseSeq: Difference between revisions
(Created page with "{{DISPLAYTITLE:WiseSeq: Scripted Sequences}} {{wisemxport|~~~~}} The first thing we need is an NPC and for this example we are going to use my favorite: {{ent|npc_zombie}}. T...") |
Thunder4ik (talk | contribs) m (Unicodifying, replaced: See Also → See also, [[Image: → [[File: (4)) |
||
Line 8: | Line 8: | ||
One flag is set for our Zombie: ''Template NPC''. I have also created one Output for our Zombie in case it gets damaged before it is triggered. | One flag is set for our Zombie: ''Template NPC''. I have also created one Output for our Zombie in case it gets damaged before it is triggered. | ||
{| {{OutputsTable}} | {| {{OutputsTable}} | ||
| [[ | | [[File:Io11.png]] || OnDamaged|| zombieSeq|| BeginSequence|| || 0.00 || No | ||
|} | |} | ||
“zombieSeq” is the name of our {{ent|scripted_sequence}}. This is where we will add the sequences for our Zombie to stand up and to initially use a sitting position. When we took at look at the Sequence list above we would have picked the ones that we plan on using here. | “zombieSeq” is the name of our {{ent|scripted_sequence}}. This is where we will add the sequences for our Zombie to stand up and to initially use a sitting position. When we took at look at the Sequence list above we would have picked the ones that we plan on using here. | ||
Line 31: | Line 31: | ||
One Output is needed for our <code>npc_template_maker</code>: | One Output is needed for our <code>npc_template_maker</code>: | ||
{| {{OutputsTable}} | {| {{OutputsTable}} | ||
| [[ | | [[File:Io11.png]] || OnSpawnNPC|| zombieSeq|| MoveToPosition|| || 0.00 || No | ||
|} | |} | ||
To put all this in motion we use one {{ent|trigger_once}}. | To put all this in motion we use one {{ent|trigger_once}}. | ||
{| {{OutputsTable}} | {| {{OutputsTable}} | ||
| [[ | | [[File:Io11.png]] || OnTrigger|| zombieSounds|| PlaySound|| || 0.00 || No | ||
|- | |- | ||
| [[ | | [[File:Io11.png]] || OnTrigger|| zombieSeq|| BeginSequence|| || 0.00 || No | ||
|} | |} | ||
Line 47: | Line 47: | ||
*'''SourceEntityName''': zombie | *'''SourceEntityName''': zombie | ||
==See | ==See also== | ||
*[http://type3studios.com/downloads/tutorials/SdkNutsTutorials/WiseSeq.zip Example VMF] | *[http://type3studios.com/downloads/tutorials/SdkNutsTutorials/WiseSeq.zip Example VMF] | ||
*[https://cdn.discordapp.com/attachments/434089157875466242/466190474584129541/WiseSeq.vmf Example VMF backup] | *[https://cdn.discordapp.com/attachments/434089157875466242/466190474584129541/WiseSeq.vmf Example VMF backup] |
Revision as of 05:51, 7 January 2024
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
The first thing we need is an NPC and for this example we are going to use my favorite: npc_zombie. There’s only one used in this so let’s just name it: zombie. We will need to name the entities in this tutorial so they can reference each other.
Pull up the properties for our npc_zombie
and click on the “Model” tab at the top. Cycle down through the Sequence list. You can test the different animations here. For our example we are going to start the Zombie out sitting down. We will use a trigger to wake our Zombie. The Zombie will then stand up and attack us.
One flag is set for our Zombie: Template NPC. I have also created one Output for our Zombie in case it gets damaged before it is triggered.
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnDamaged | zombieSeq | BeginSequence | 0.00 | No |
“zombieSeq” is the name of our scripted_sequence. This is where we will add the sequences for our Zombie to stand up and to initially use a sitting position. When we took at look at the Sequence list above we would have picked the ones that we plan on using here.
- Name: zombieSeq
- Target NPC: zombie
- Pre Action Idle Animation: slump_a
- Action Animation: slumprise_a
- Search Radius: 512
- Move to Position: Instantaneous
- Flags: No Interruptions, Override AI, Priority Script
Our next entity is one npc_template_maker.
- Name: zombieTemplate
- Start Disabled: No
- Num. of NPCs: 1
- Max Live NPCs: 1
- Name of template NPC: zombie
- Radius: 256
- Dest. Criterion Visible: Don’t care
- Dest. Criterion Distance: Don’t care
One Output is needed for our npc_template_maker
:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnSpawnNPC | zombieSeq | MoveToPosition | 0.00 | No |
To put all this in motion we use one trigger_once.
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
![]() |
OnTrigger | zombieSounds | PlaySound | 0.00 | No | |
![]() |
OnTrigger | zombieSeq | BeginSequence | 0.00 | No |
"zombieSounds" is an ambient_generic that I’ve used to play the sound of a girl screaming when the Zombie wakes. It is not needed but things like this are easy to do and make your scripted NPC’s all the better.
- Name: zombieSounds
- Sound Name: ambient/creatures/town_child_scream1.wav
- Volume: 10
- SourceEntityName: zombie