Cleanup is going to take awhile, so the site is back up but editing has been disabled.
Scanner dropping a mine
From HalfLife 2 Knowledge Base
By: expert
Contents |
Description
This tutorial will explain how to spawn a scanner, make it follow a set path, and drop a mine at a point on its path.
Note: If you want shield scanners in your map instead of regular scanners, the name of your map must begin with "d3_c17_".
Setting up the Scanner
Step 1. First we will need to make our scanner. Create a npc_cscanner and name it pathscanner_1_scanner. Make sure Should inspect is set to No. Now check the flag Template NPC.
Step 2. Next make a npc_template_maker near your scanner and name it pathscanner_1_scanner_maker. Make sure Start Disabled is set to Yes. Enter the name of your npc_cscanner (pathscanner_1_scanner) for the Name of template NPC. Add the following outputs:
OnSpawnNPC pathscanner_1_scanner InputSetFlightSpeed 300 0.00 No
OnSpawnNPC pathscanner_1_scanner_aiss_1 StartSchedule 0.00 No
OnSpawnNPC pathscanner_1_scanner EquipMine 0.00 No
Note: We will be making pathscanner_1_scanner_aiss_1 in the next step.
Step 3. Make an aiscripted_schedule near your scanner and name it pathscanner_1_scanner_aiss_1. Enter the name of your scanner (pathscanner_1_scanner) for Target NPC. For Schedule to run, select Run Goal Path. Change Interruptability to Death. For Goal entity, put pathscanner_1_path_1. We will be making this entity later.
Making the Scanner's Path
Step 4. Now we will make the scanner's path. Create a path_corner near your scanner and name it pathscanner_1_path_1. Now hold shift and drag this path_corner to where you want the next point in your scanner's path. Finish setting up your scanner's path.
Step 5. Click on the path_corner you want your scanner to drop its mine at (Not the last in its path), and add the following outputs:
OnPass pathscanner_1_scanner DeployMine 0.00 No
OnPass pathscanner_1_scanner_aiss_2 StartSchedule 0.20 No
Note: We will be making pathscanner_1_scanner_aiss_2 in the next step.
Step 6. Make another aiscripted_schedule near your scanner and name it pathscanner_1_scanner_aiss_2. Enter the name of your scanner (pathscanner_1_scanner) for Target NPC. For Schedule to run, select Run Goal Path. Change Interruptability to Death. For Goal entity, put the name of the path_corner you chose in Step 5.
Step 7. (Optional) Now click on the last path_corner in your scanner's path and add the following output:
OnPass pathscanner_1_scanner Kill 0.00 No
Triggering the Scanner
Step 8. Finally, we will need to trigger the npc_template_maker. For this, I will use a logic_auto. Make a logic_auto somewhere in your map, and give it the following output:
OnMapSpawn pathscanner_1_scanner_maker Spawn 0.10 No
Note: You can use anything you want to trigger this, but for this tutorial I used a logic_auto.
Credit to VALVe for this tutorial - I didn't figure this out myself.
Note: If you put your path_corners too far apart, you may need to put info_node_air entities between them so the scanner can find its way between the two points.

