In this post I will teach you how to add and config a few other entities, such as;

  • env_shooter, which I’ll use to create a dispenser that gives out drinks.
  • env_shake, to create an earthquake effect.
  • env_steam, to add detail to damaged pipes.
  • chicken, add a few chickens into the level, why not?

entities

R-L

env_shooter – is a point entity available in all Source games. It shoots giblets out of its origin. These gibs can be either models or sprites.

env_shake – is a point entity available in all Source games. It controls screen shakes on players. With this entity you can simulate tremors (earthquakes, blast waves, passing vehicles).

env_steam – is a point entity available in all Source games. It is used to create a jet of steam or heat wave distortion.

chicken – Chicken is a chicken.

 

env_shooter (Dispenser)

shootericon

To do this I will need; env_shooter and prop (preferred prop_dynamic).

Select the Entity Tool and use Objects dropdownlist to find prop_dynamic then left click in the level to add it. Double click the entity to open its properties. Open the Model Browser by selecting World Model and clicking browse. Select the vending machine model (vending_machine.mdl), then hit OK. Hit apply and close when finished (Reposition if necessary)

Select the Entity Tools again and filter this time for env_shooter and add it to your level. Reposition it to where the you want the giblets to come out from the bottom of the vending machine.

shooter

Double click the env_shooter entity to open its properties. You will notice it has a lot of properties that you can set. Here a few of the important ones;

env_shooter

 

  • Gib Direction – The direction the gibs will fly.
  • Gib Angle – The orientation of the spawned gibs.
  • Gib Life – Time in seconds for gibs to live +/- 5%.
  • Gib Velocity – Speed of the fired gibs.
  • Number of Gibs – Total number of gibs to shoot each time it’s activated.
  • Model – Thing to shoot out. Can be a .mdl or a .vmt.
  • Simulate – Type of Model it will shoot it.
  • Delay Between Shots – Delay (in seconds) between shooting each gib. If 0, all gibs shoot at once.

For the purpose of this post, I will set a few changes to these properties to allow bottles to shoot out from the vending machine.

  • Start with the model. Select the Model property and hit browse button to open the Model Browser. Filter for bottle and select water bottle (water_bottle.mdl). Hit OK to apply it.
  • Set the Simulate to be physics, as we want the bottle to have physics properties.
  • Set number of gibs to be one, as we want one bottle at a time.
  • Leave the Delay Between Shot at zero and Gib Velocity at 200 (The larger the value the further and fast it will go out).
  • For Gib life is optional, as it relays on how long you want bottle to say in the level. I’m going with 100.
  • Gib Angle 90 0 0. It will shoot the bottle side ways.
  • Use  Top view port to config Gib Direction.

shooter1

 

Lastly click the Flag tab and enable the repeatable setting to allow you use the env_shooter more than once.

Now that you have done that you will need to add a button to the machine to shoot out the bottle. I am sure you able to do that by now (hint create a brush with the invisible texture and tie it to button entity. In the Output tab set the Via this input to shoot).

Compile and run the map to test it.

 

env_shake (earthquake)

earth

Select the Entity Tools and Filter for env_Shake in the Objects dropdownlist. Left click to add to the level, then double click the entity to open its properties.

earth2

Properties are;

  • Amplitude – The amount of noise in the screen shake. Should be a range between 0 and 16.
  • Effect Radius – The radius around this entity in which to affect players.
  • Duration – The length of time in which to shake the player’s screens.
  • Frequency – The frequency used to apply the screen shake. Should be a value between 0 and 255, where 0.1 = jerk, and 255.0 = rumble.

Flags setting are;

  • GlobalShake – Shaking occurs throughout the entire map.
  • In Air – Objects in the air are affected by the shaking.
  • Physics – Shake physical objects to create realistic feel.
  • Ropes –  Shakes ropes.
  • Don’t shake view – Doesn’t shake players view.

 

This entity requires some testing to figure out the right property values. I have create two, each connected to a button to test the difference in-game

1- Default Amplitude and Frequency, but increase duration to notice the affect.

shake2

2- Increased the Amplitude 10, set the frequency to 180 with duration 10.

shake1

Attach these to button so that they can be triggered when used activates them. Compile and run the game.

 

env_steam (pipes)

steamicon

Select the Entity Tools and search for env_steam in the objects dropdownlist. Left click in the level to add it. Double click the Entity to display its properties.

steamprop

Properties are;

  • Initial State – Option if starts enabled.
  • Particle Type – Steam effect type. There are two; normal or heatwave. Steam effect type,
  • Spread Speed -The amount of random spread in the particle’s velocity after they spawn.
  • Speed – The default speed at which the particles move after they spawn.
  • Particle Start Size – The initial size of the particles after they spawn.
  • Particle end Size – The size of the particles at the point at which they are removed.
  • Emission Rate – The rate of particle emission. i.e. particles per second.
  • Color – Steam colour, only used if emissive flag is set.
  • Length of stream jet – The length of the jet determines the lifetime of each particle.
  • Translucency – Render alpha value.
  • Pitch Yaw Roll (X Y Z) – This entity’s orientation in the world.

Flag settings;

  • Emissive – Provides colour to the steam.

Will create three env_steam entities with different properties;

1- Initial state on, pointing up with Emissive setting selected to give white colour.

steam1

2- Initial state on, pointing up, particle speed 40, end size 30, 30 emission rate and coloured green (need to make sure Emissive is selected to activate the colour)

steam2

3- Initial state on, point up, but type is set to heatwave (It will not show steam but a heatwave)

steam3

Compile and run the game to view them in-game.

 

Chickens (bwak)

chicken1

This entity is very simple to add. Select the Entity Tools and add an entity to your level. Double click the entity to open its properties.  Type in the Class dropdownlist Chicken and hit enter. The entity should change to look like the image above. This entity has no properties.

chicken

Nothing else to do. Compile and run the map.

 

Video 

Leave a comment