Nick Urko's Portfolio

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


You can download the files used for this tutorial here:

 


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

Picture
  • Create 1 npc_combinedropship
    • Under Class Info
      • Give it a Name
      • Enter a Squad Name
      • Change Crate Type to Soldier Crate
Picture
  • 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
Picture
  • 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
Picture
  • Under Flags
    • Check off Template NPC
Picture
  • Back in npc_combinedropship
    • Under Class Info
      • Assign the Combine NPC’s to the Dropship under Name of Template NPC(1-3)

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.

Picture
  • Create an npc_template_maker where you want the Dropship to spawn
Picture
  • Under Class Info
    • Give it a name
    • Pick your Dropship under Name of Template NPC
Picture
  • Create a trigger box near the spawn point (trigger_once)
  • You may want to mark its boundaries with prop_statics for your convenience
Picture
  • Under Class Info
    • Give it a name
Picture
  • 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

Picture
  • Create a path_track entity. It should be in the air near where the Dropship spawns.
    • Under Class Info
      • Give it a name
Picture
  • 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
Picture
  • 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

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

Picture
  • 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
Picture
  • Go into the landing point’s properties
    • Under Class Info
      • Give it a name
Picture
  • Go into the three dustoff point properties
    • Under Class Info
      • Give them unique names (1,2,3)
Picture
  • 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)
Picture
  • 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.


Now to make it fly away once it has dropped the soldiers off.




Picture
  • 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)


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

Picture
  • 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.
Picture
  • 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

Picture

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




Picture
  • Under Class Info
    • Give it a name
    • Pick your Dropship under Name of Template NPC
Picture
  • Create a trigger box near the spawn point (trigger_once)
  • You may want to mark its boundaries with prop_statics for your convenience
Picture
  • Under Class Info
    • Give it a name
Picture
  • 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

Picture
  • Create a path_track entity. It should be in the air near where the Dropship spawns.
    • Under Class Info
      • Give it a name
Picture
  • 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
Picture
  • 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

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

Picture
  • 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.
Picture

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)


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

Picture
  • Create 1 npc_combinedropship
    • Under Class Info
      • Give it a Name
      • Change Crate Type to Strider (No crate)
Picture
  • 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

Picture

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




Picture
  • Under Class Info
    • Give it a name
    • Pick your Dropship under Name of Template NPC
Picture
  • Create a trigger box near the spawn point (trigger_once)
  • You may want to mark its boundaries with prop_statics for your convenience
Picture
  • Under Class Info
    • Give it a name
Picture
  • 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

Picture
  • Create a path_track entity. It should be in the air near where the Dropship spawns.
    • Under Class Info
      • Give it a name
Picture
  • 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
Picture
  • 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

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

Picture
  • 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

Now make it fly away once it has dropped the Strider off.

  • 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.