You need to log in to create posts and topics.

I need smoke to go after the player.

I'm creating a Portal 2 level where I'm using env_smokestack to simulate a ghost. I'm using a func_tanktrain to make it move during the story. There is one point in the story where I need the ghost to chase down and kill the player (this happens if the player purposefully does something stupid that stops the story from progressing.) My first instincts on accomplishing this was to turn an invisible brush into an NPC, and have the env_smokestack parented to it. Unfortunately, I cannot find any instructions on creating a custom npc character. If anyone knows of a video or written instructions on how to do this, or if there is an easier way to accomplish this, I'd appreciate the info. Thanks.

Check out my Science Fiction novels at

you can use "EnableAlternatePath" of your path_tracks when the "player does something stupid"
There is no other alternative to create Npc than using path_tracks for the moment
(i have a big project involving scripts to create an AI in p2 :1up:)

path_tracks are a point entity right? They could be parented to the player

?????????????????????????????TWP Releases | My Workshop

Did you manage to get this effect, Samot? Seems like a cool idea. I'd love to know how to do this.

It is possible to implement this idea using a vscript.

You can change the position and rotation of the ghost by working out the vector between itself and the player then moving it 'x' distance. This is called Linear Interpolation (google lerp function). Because it is a 'ghost' you don't need to figure out any pathing logic - though could still be done using functions like TraceLine(Vector, Vector, handle).

Below is code that would make an object follow the player at 10 units per/s. I used a dynamic model with the think function of think for testing.

Code: Select all
// Speed of movement of the thing
x <- 10

// Set the direction of this entity to face the player
function think() {
   local p = player.GetOrigin()
   local s = self.GetOrigin()
   local d = p - s // The difference between this angles and the players
   self.SetForwardVector(d) // Set the angles of the object to face the placer
   self.SetOrigin(self.GetForwardVector() * x + s) // Move x units forward from original vector

See ... _Functions for a full list of Portal 2 scripting functions.

?????????????????????????????TWP Releases | My Workshop