Posts Tagged ‘lasers’

In this post I will teach you how to add and configure four env entities;

env_fire – is a point entity available in all Source games. It handles a single flame at its origin. The flame causes heat ‘damage’ to other env_fire entities around it, and will eventually ignite non-flaming env_fire entities nearby causing fire to spread.

env_explosion – is a point entity available in all Source games. It creates and exposition  at its origin. To create an invisible explication that moves objects that moves objects within a radius use env_phyexplosion.

env_spark – is a point entity available in all Source games. It is used to create sparks at its origin.

env_laser –  is a point entity available in all Source games. It creates a laser beam between itself and a given target.

env

Select the Entity tools and filter in the objects dropdownlist in the bottom right side of the hammer editor for the appropriate env entity. Left click in the world to add that entity. After you have added the entity double click the it to open it.

1- env_fire

env2

fire1

Properties are;

  • Duration – Amount of time the fire will burn.
  • Size – Height (in world units) of the flame.
  • Attack – Amount of time the fire takes to grow to full strength.
  • Type – Either Natural or Plasma. Natural is a general all purpose flame, like wood fire.
  • Damage Scale – Multiplier of the burn damage done by the flame.
  • Ignition Point – Amount of heat ‘damage’ to take before this flame should ignite.

As well as these properties you are able to set certain settings, they can be found under the Flag tab;

  • Infinite Duration – This will set the fire to have infinite duration (it will ignore the duration property).
  • Smokeless – It will remove smoke from the entity.
  • Start On – (Self explanatory) start on, no need for ignition points.
  • Start Full – Start with the fire
  • Don’t drop – (Not sure, never used it).
  • No glow – The fire entity will not give a glow (I recommend adding light entity for the glow).
  • Delete when out – When the fire is extinguished it will delete itself.
  • Visible from above –

Here are different fire types with different property values (R-L).

1- Standard fire, default properties with settings Start On and Start Full.

2- Lower flame, lowered the size of the flame to 10. Same settings (Start on and Start Full).

3- Standard fire. Attack set to 30 because the flame start on but not full. (Unable to notice, due its a picture)

2014-04-10_00001

If you plan on adding the fire entity on top of a prop,  then you need to make sure that prop is prop_static not prop_dynamic or prop_physics. (Left prop_dynamic and right prop_static).

2014-04-10_00002

 

 

2- env_explosion

env3

explosion

properties are;

  •  Magnitude – The amount of damage done by the explosion.
  • Radius Override – If specified, the radius in which the explosion damages entities, If unspecified, the radius will be based on the magnitude.
  • Fireball Sprite – Sprite of the fireball.
  • Render Mode – Render mode of the fireball. 0 Normal, 4 Solid, 5 Additive.
  • Ignored Entity – Do not harm or affect the named entity.

Setting for the entity can be found under the flag tab (all are self explanatory);

explosion1

This entity is better used when it is connected to a button or even to trigger the explosion.

3- env_spark

env4

spark

properties are;

  • Pitch Yaw Roll (X Y Z) – This entity’s orientation in the world.
  • Max Delay – The longest delay between sparks (in seconds).
  • Magnitude – The size of the sparks.
  • Spark Trail Length – Length of the spark trails.

Settings;

  •  Start On – Start when map loads
  • Glow – It gives off glow when there are sparks.
  • Silent – Sparks make no sound when on.
  • Directional – Spark go off in a certain direction provided by value in the Pitch Yaw Roll.

Here a few examples (R-L);

1- Default properties and with the Start on setting selected.

2- 5 second Max delay, with Glow and Start on setting selected.

3- 5 second Max delay, Large Magnitude,  medium Spark Trail Length and with Start on setting selected.

2014-04-10_00007

 

 

4- env_laser

This entity is different to the other env entities in this post, as it requires a target. You have two options when coming to add a target, you can use entity info_target or use a normal prop to be a target. I’ll show both cases.

laser

laser1

properties are;

  • Target of Laser -Name of entity, or entities, to strike at. The target is randomly chosen if there are multiple entities matching the given name.
  • Brightness - Beam brightness.
  • Beam Color  Beam color.
  • Width of Beam - The width of the laser beam, in pixels.
  • Amount of noise – The amount of noise in the beam. 0 is a perfectly straight beam.
  • Sprite Name - The material used to draw the laser beam.
  • End Sprite - If specified, this sprite will be drawn at the end of the laser beam.
  • Texture Scroll Rate – Rate at which the beam texture should scroll along the beam.
  • Starting Frame - The frame to start the beam texture on.
  • Damage / second - How much damage this laser does. per second. to things it hits.
  • Dissolve Type - Dissolve effect type.

Setting that env_spark has;

  • Start On – Start on when map is loaded.
  • Start Sparks – Sparks appear where the laser starts.
  • End Sparks –  Sparks appear where the laser ends (target).
  • Decal End – Where the laser ends decal is added on the surface of the object.

Examples;

1- Prop Target

So will start by making a prop as the target. You will need to add prop_dynamic, its the only prop entity that allows you to give it a name (prop_dynamic_override will do too).  Once you have selected the appropriate model and given the prop entity a name, add an env_laser entity and open its properties.

Here we will set a few different settings. First set the Target of Laser to the name of the prop. Also set the sprite of the laser. to do that select Sprite Name property and press the browse button to open the textures window. Unfortunately CS:GO SDK only has three types of sprites that fit with env_laser;

  • physbeam
  • laserbeam
  • purplelaser

Filter for one of them and double click it to select it. Leave all the other property values set to default. Lastly under flag tab select the Start On setting.

2- Using info_Target

Select the Entity Tool and use object dropdownlist to find ‘info_target’. Left click in the level to add it (reposition it if necessary). Open the info_target properties and give it a name. Now that is done go back to the env_laser and set the Target of Laser to be the info_target name. Leave all the other env_laser properties to default. Again go under the flag tab and select the Start on setting

Make sure in both cases you have Start On setting selected. It can be found under the Flag tab. If you dont have it select then it wont start (Unless you plan on using a trigger to activate it)

In-game

2014-04-10_00008

 

 Video: