Source SDK Dropship Tutorial
_By Nick Urko, C15 Level Designer
This tutorial demonstrates various uses for the npc_combinedropship entity:
-Dropping Combine Soldiers
-Dropping Rollermines
-Dropping Striders
This tutorial demonstrates various uses for the npc_combinedropship entity:
-Dropping Combine Soldiers
-Dropping Rollermines
-Dropping Striders
Setup
_
- Create a large open space for the play area. Mine is a 4096 unit hollow cube, but any wide-open space will work.
- Create a player spawn point on one side of the map. The Dropships are going to spawn on the other side of the map and fly over to us.
Dropping off Combine Soldiers
Step 1 - Create and Setup the Entities
___
- Create 1 npc_combinedropship
- Under Class Info
- Give it a Name
- Enter a Squad Name
- Change Crate Type to Soldier Crate
- Under Class Info
__
- Under Flags
- Check off No Rotorwash. This disables the effect that simulates a helicopter blade blowing dirt around on the ground as it lands.
- Check off Template NPC
- Create three npc_combine_s. These will be template soldiers that exit the Dropship.
- Under Class Info
- Give them each a unique name (Combine1, Combine2, Combine3)
- Assign them all to the same squad as the Dropship
- Under Class Info
- Under Flags
- Check off Template NPC
__
- Back in npc_combinedropship
- Under Class Info
- Assign the Combine NPC’s to the Dropship under Name of Template NPC(1-3)
- Under Class Info
Step 2 - Spawn the Dropship
_There are many ways to do this, but for our purposes I am just going
to make a trigger box that spawns the Dropship once the player steps
into it.
- Create an npc_template_maker where you want the Dropship to spawn
_
- Under Class Info
- Give it a name
- Pick your Dropship under Name of Template NPC
_
- Create a trigger box near the spawn point (trigger_once)
- You may want to mark its boundaries with prop_statics for your convenience
_
- Under Class Info
- Give it a name
_
- Add a new output
- My output named: OnTrigger
- Target entities named: Pick your npc_template_maker
- Via this input: Spawn
_If you play the level now, the Dropship will spawn as the player walks through the trigger box. Now we need to make it move.
Step 3 - Make it Fly
_
- Create a path_track entity. It should be in the air near where the Dropship spawns.
- Under Class Info
- Give it a name
- Under Class Info
- Select the path_track in the editor, hold shift, and click and drag to copy another path_track.
- This method will setup the path so that the original will link to the next one, and so on.
- You can also go into the properties to change them manually.
- I have a total of 3 path_track entities for this Dropship
- Back in the npc_combinedropship properties
- Under Class Info
- Choose your first path_track in the field Target path_track
- Under Class Info
_
- Back in the trigger properties
- Under Outputs
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: Activate
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: FlyToSpecificPathViaTrack (instructs the Dropship to fly to a particular path_track)
- Parameter Override: Pick the final path_track in your set of path_tracks
- Add an output
- Under Outputs
_If you play your level now, the Dropship will fly through the path_tracks. Now we need to tell it to land.
Step 4 - Make it Land
- Add 4 info_target entities to your level.
- One will be used to mark the Dropship’s landing spot
- The other three mark the Combine soldier’s destinations
_
- Go into the landing point’s properties
- Under Class Info
- Give it a name
- Under Class Info
_
- Go into the three dustoff point properties
- Under Class Info
- Give them unique names (1,2,3)
- Under Class Info
- Back in the npc_combinedropship
- Add the landing point under Land target name
- Add the dustoff points under Name of dustoff point for NPC (1,2,3)
_
- In the properties for the last path_track
- Under Outputs
- My output named: OnPass (activates when the Dropship reaches the path_track)
- Target entities named: Pick the name of your Dropship
- Via this input: LandTakeCrate or LandLeaveCrate
- Parameter Override: This is how many units are getting out of the Dropship, so it is three in this case.
- Under Outputs
_
Now to make it fly away once it has dropped the soldiers off.
Now to make it fly away once it has dropped the soldiers off.
- Back in the npc_combinedropship entities properties
- Under Outputs
- Add
- My output named: OnFinishedDropoff (This activates once the drop-off is complete)
- Target entities named: Pick the name of your Dropship
- Via this input: FlyToSpecificTrackViaPath
- Parameter Override: Pick the path_track furthest away from you
- Add
- My output named: OnFinishedDropoff (This activates once the drop-off is complete)
- Target entities named: Pick the name of your Dropship
- Via this input: Break (This removes the Dropship from gameplay now that it is done)
- Add
- Under Outputs
_
That is it. If you are getting weird behavior with either the Dropship of the Combine Soldiers, play with their placement and make sure they have enough empty space around them.
That is it. If you are getting weird behavior with either the Dropship of the Combine Soldiers, play with their placement and make sure they have enough empty space around them.
Dropping Rollermines
_Step 1 – Create and Setup the Entities
- Create 1 npc_combinedropship
- Under Class Info
- Give it a Name
- Change Crate Type to Roller Hopper
- If you have a specific Rollermine you want to use, assign it to the Name of Rollermine Template field. If you leave it blank, it will drop default Rollermines.
- Under Class Info
- Under Flags
- Check off No Rotorwash. This disables the effect that simulates a helicopter blade blowing dirt around on the ground as it lands.
- Check off Template NPC
Step 2 - Spawn the Dropship
There are many ways to do this, but for our purposes I am just going
to make a trigger box that spawns the Dropship once the player steps
into it.
- Create an npc_template_maker where you want the Dropship to spawn
_
- Under Class Info
- Give it a name
- Pick your Dropship under Name of Template NPC
_
- Create a trigger box near the spawn point (trigger_once)
- You may want to mark its boundaries with prop_statics for your convenience
_
- Under Class Info
- Give it a name
_
- Add a new output
- My output named: OnTrigger
- Target entities named: Pick your npc_template_maker
- Via this input: Spawn
_If you play the level now, the Dropship will spawn as the player walks through the trigger box. Now we need to make it move.
_Step 3 – Make it Fly
_
- Create a path_track entity. It should be in the air near where the Dropship spawns.
- Under Class Info
- Give it a name
- Under Class Info
_
- Select the path_track in the editor, hold shift, and click and drag to copy another path_track.
- This method will setup the path so that the original will link to the next one, and so on.
- You can also go into the properties to change them manually.
- I have a total of 4 path_track entities for this Dropship
- Back in the npc_combinedropship properties
- Under Class Info
- Choose your first path_track in the field Target path_track
- Under Class Info
_
- Back in the trigger properties
- Under Outputs
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: Activate
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: FlyToSpecificPathViaTrack (instructs the Dropship to fly to a particular path_track)
- Parameter Override: Pick the final path_track in your set of path_tracks
- Add an output
- Under Outputs
_If you play your level now, the Dropship will fly through the path_tracks. Now we need to tell it to land.
Step 4 – Make it Drop Mines
_
- Find the path_track where you want to start dropping mines and go into its properties
- Under Outputs
- My output named: OnPass (activates when the Dropship reaches the path_track)
- Target entities named: Pick the name of your Dropship
- Via this input: DropMines
- Parameter Override: This is how many Rollermines drop. I picked four.
- Under Outputs
_Now to make it disappear once it has reached the end of its flight path.
- In the final path_track’s properties
- Under Outputs
- Add
- My output named: OnPass (activates when the Dropship reaches the path_track)
- Target entities named: Pick the name of your Dropship
- Via this input: Break (This removes the Dropship from gameplay now that it is done)
- Add
- Under Outputs
_That is it. In a real level, remember not to disable your Dropship while the player can see it.
_Dropping off a Strider
_Step 1 – Create and Setup the Entities
_
- Create 1 npc_combinedropship
- Under Class Info
- Give it a Name
- Change Crate Type to Strider (No crate)
- Under Class Info
_
- Under Flags
- Check off No Rotorwash. This disables the effect that simulates a helicopter blade blowing dirt around on the ground as it lands.
- Check off Template NPC
Step 2 - Spawn the Dropship
_There are many ways to do this, but for our purposes I am just going
to make a trigger box that spawns the Dropship once the player steps
into it.
- Create an npc_template_maker where you want the Dropship to spawn
__
- Under Class Info
- Give it a name
- Pick your Dropship under Name of Template NPC
_
- Create a trigger box near the spawn point (trigger_once)
- You may want to mark its boundaries with prop_statics for your convenience
- Under Class Info
- Give it a name
- Add a new output
- My output named: OnTrigger
- Target entities named: Pick your npc_template_maker
- Via this input: Spawn
If you play the level now, the Dropship will spawn as the player walks through the trigger box. Now we need to make it move.
_Step 3 – Make it Fly
- Create a path_track entity. It should be in the air near where the Dropship spawns.
- Under Class Info
- Give it a name
- Under Class Info
_
- Select the path_track in the editor, hold shift, and click and drag to copy another path_track.
- This method will setup the path so that the original will link to the next one, and so on.
- You can also go into the properties to change them manually.
- I have a total of 4 path_track entities for this Dropship
- Back in the npc_combinedropship properties
- Under Class Info
- Choose your first path_track in the field Target path_track
- Under Class Info
_
- Back in the trigger properties
- Under Outputs
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: Activate
- Add an output
- My output named: OnTrigger
- Target Entity: Name of your Dropship
- Via this input: FlyToSpecificPathViaTrack (instructs the Dropship to fly to a particular path_track)
- Parameter Override: Pick the final path_track in your set of path_tracks
- Add an output
- Under Outputs
_If you play your level now, the Dropship will fly through the path_tracks. Now we need to tell it to drop the Strider.
_Step 4 – Drop the Strider
- Pick a path_track to drop the Strider at
- Under Outputs
- My output named: OnPass (activates when the Dropship reaches the path_track)
- Target entities named: Pick the name of your Dropship
- Via this input: DropStrider
- Under Outputs
Now make it fly away once it has dropped the Strider off.
That is it. The Strider should behave just like any other Strider, but this tutorial does not cover Strider scripting.
- Add a grid of info_node_air entities surrounding the Dropship.
- If you do not add these, the Dropship tends to get stuck after dropping of the Strider
That is it. The Strider should behave just like any other Strider, but this tutorial does not cover Strider scripting.