WiseNPC05: Strider, Scanner, Combine Mine
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
Part two of WiseNPC05. The same Strider is used but starts out underground.
Events in this project:
- Map spawns with a Scanner flying around.
- Ground breaks open and a Strider walks up out of the water.
- Scanner joins Strider as it begins patrolling.
- Scanner is equipped with a Combine Mine, still follows Strider.
- Scanner deploys the Combine Mine, continues to follow Strider.
The hole in the ground illustrates a few considerations about using Striders.
- The Strider can be hidden out of sight until needed.
- It can climb out of holes that are deeper than it is tall.
- An angled exit point from holes can help to the effect.
Most all of the events in this project are fired off from one trigger_once
.
The others are Outputs from two path_corner
entities.
There is one exception to the note above, placement of the second path_corner
in this project is crucial. The first two path_corner
are only used once, and then the Strider will follow other path_corner
s. These are placed so the Strider will come up out of the hole the way we want and will avoid the hole during its patrol.
The concept of hiding a Strider can be achieved in many ways. In the Train Station levels of HL2 a Strider is hidden behind a large building. The same method I’ve used here could be done with a wall. Apparently you can also carry Striders with Combine Drop Ships. Sweet.
These are the Outputs for our trigger_once
:
For spawning the scanner:
- Class: point_template
- Name: strider_template
- Template 1: strider_1
- Templace 2: scanner_1
- Flag: Preserve entity names
Notice the Outputs for our trigger_once
. Seven seconds after the map spawns the Scanner will begin to follow the Strider:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
OnTrigger | scanner_1 | SetFollowTarget | strider_1 | 7.00 | Yes |
The ground breaking open is done with a func_breakable
.
- Name: ssdoor01
- Prop data: Rock medium
- Flag: Break on Trigger only
These are the properties for the Scanner:
- Class: npc_cscanner
- Name: scanner_1
- Should Inspect: No
Since the Scanner will be following our Strider we don’t need to do anything else, however to illustrate that it can follow the Strider and accomplish other tasks I’ve added Outputs to two of the path_corners
that will equip the Scanner with a Combine Mine and then at the next path_corner
deploy, drop, the mine.
When the OnPass
output fires from the path_corner
, they target our scanner (scanner_1
) with an input. 3 uses Equipmine
, 4 uses DeployMine
.
The first time the Scanner passes path_corner
3 it will get a Combine Mine. When it reaches path_corner
4 it will drop the mine.
You may see this in the console:
Late precache of models/props_combine/combine_mine01.mdl Late precache of sprites/glow01.vmt
You can fix this simply by hiding a mine somewhere. In this project I hid one under ground.