Download example file
Introduction
See also:
Tutorial: Laser and Beam Effects •
Tutorial: Using SpritesThe Goldsource engine is full of wonderful and useful entities, sadly however a lot of them are hugely unused and many mappers do not realise the brilliance of these entities. This tutorial will step through some of the most useful entities provided by beam and sprite effects that you may not know about.
env_bubbles
See also:
env_bubblesThis is a simple brush based entity used to create simple water bubble effects on any given location, just create any brush and tie it to env_bubble (texture does not matter). The size of the brush will determine where the chosen amounts of bubbles will spawn, they will not leave this brush.
Properties
- Name : The name of the entity, can be used to turn it on or off.
- Bubble density : The amount of bubbles you want the brush to contain per current.
- Bubble frequency : The frequency interval between each bubble current.
- Speed of current : The speed of the current a.k.a. the speed of each individual bubble. 6 - 32 is a good range of values.
Flags
- Start Off : Self explanatory.
env_funnel
See also:
env_funnelNow this is one of my favourite entities; it's basically a stand alone effect, it has no properties besides it's name for the trigger, It creates a massive amount of sprites at once and either forces them to fly away from it or fly directly into the entity. If you remember the Mission in half-life where the test chamber was destroyed and the alien invasion began, this effect was used there for massive amounts of sprites that came out of the big beam. The downside of this entity however is that you cannot choose the sprites it creates, but it's still a very good entity in some situations.
To see what this entity does with your own eyes (it's pretty amazing), view the example map I added. You have to compile it first.*
Properties
Flags
- Reverse : Normally the entity sucks in the sprites from thin air, but with this ticked it pushes them out rather quickly back into the air.
env_shooter
See also:
env_shooterNow this is an extremely good and very flexible entity, one of my favourites. It is used to either spit out models like gibs
OR sprites! You can select any sprite, set the properties correctly, and the entity will chuck them out onto the floor where they live for how long you choose.
Properties
- Name : Self explanatory
- Pitch Yaw Roll (Y Z X) : You can select in which direction they are spat out from the entity.
- Number of Gibs : The number of gibs or sprites it spits out. If you select 2 it will spit out two of the same model or sprite you selected. simple.
- Delay between shots : The time delay between each model or sprite is spat out. If you only chose one this is useless to you.
- Gib Velocity : This is roughly the units it will fly before it hits the floor from the entity, if you select 256 it will fly roughly 256 units till it hits the floor (roughly speaking of course, If you put the entity high it may travel longer.)
- Course Variance : This determines the randomness of each item spat out. If you set it to 0 they will travel in the same direction always, but a value like 0.5 will spit them differently yet roughly in the same direction. Feel free to experiment with this to your liking.
- Gib Life : Once the model or sprite is spat out, how long will it live before It de-spawns / disappears? This determines it.
- Render FX : Just like for normal sprites, you can change the FX of these as well.
- Render Mode : Additive would be the best value here, feel free to experiment however.
- FX Amount (1 - 255) : The visibility of the sprite, just like for most other entities.
- FX Colour (R G B) : You can change the colour to your liking of the chosen sprite.
- Model or Sprite Name : Enter the sprite name here.
Note: Hammer only lets you select models in this window, but do not fear. simply create an env_sprite, select your chosen sprites path and copy+paste it into this tab, it will work!
- Material Sound : A small amount of selectable sounds for each spat entity. The choice is not large, I'd advise adding an
ambient_generic
instead. - Gib Sprite Scale : The scale of each model or sprite.
- Gib Skin : If you are using models for this, select the skin here. For sprites this tab is useless.
Flags
- Repeatable : The only flag, self explanatory. You can repeat the entity to your liking!
Note: After experimenting with env_shooter, I now believe that animated sprites do not work for this entity, I tested several default hl motion sprites with this entity and they do not work, so keep that in mind. All other sprites should be ok.
Advanced effect: Shockwave
See also:
env_beam •
ambient_generic •
func_train •
path_corner •
multi_managerDo you remember the shockwave blasts given off by houndeyes from half-life? It is possible to create a very similar and very good looking effect in game, although It requires some hard work. Note: If you are mapping for Spirit of half-life, the
env_shockwave
entity does this. This tutorial Is simply for doing the same thing in half-life.
Here are the entities required that I used to create this effect:
- 1 env_beam
- 1 ambient_generic
- 2 func_trains
- 4 path_corners
- 1 multi_manager
- A trigger
- Create an
env_beam
entity.- Tick these flags: Toggle, Ring.
- Set some property values:
- Name: Shockwave.
- Brightness: 25
- Colour: anything you want, I made mine light blue.
- Radius: 256
- Life: 0.5
- Width: 112
- Sprite name: sprites/shockwave.spr
- Texture scroll rate: 100
- Strike again time: -0.5
- Note: Feel free to experiment with these values.
- Create two
func_train
entities- Texture them with
{BLUE
- Tick these flags: Not Solid
- Set some property values:
- Render mode: Solid
- FX Amount: 255
- Speed: 256
- Name: Train 1 and Train 2
- Go back to the
env_beam
and set the Starting Entity to Train 1 and the Ending Entity to Train 2.
- For each train create two
path_corner
entities- Name them appropriately so they can be used in a train path.
- We are trying to create the effect that the beam is quickly expanding from the created location, so make the starting
path_corner
for each train start in the exact same spot, then move the ending path_corner
entities approximately 256 units into the opposite directions of each other. - Give the starting
path_corner
entities the Wait for retrigger flag.
- Create an
ambient_generic
with these properties:- Name: Shocksound
- Wav name:
houndeye/he_blast3.wav
- Connect everything together by creating a
multi_manager
the the following values:- Shockwave: 1
- Train 1: 1.1
- Train 2 : 1.1
- Shocksound: 1
- Shockwave#1: 1.5
To recap:
- The
multi_manager
triggers the env_beam
, which then turns itself on. - The
multi_manager
then triggers the sound and both trains at the same time. - Both trains move in the opposite direction from each other, and since the
env_beam
is targeting both trains and has the ring flag checked, it looks as if it's expanding in both directions quickly. - Finally the multi_manager triggers the
env_beam
once more and before the trains stop it turns off. The trains are still moving once the beam turns off - they move back to their starting spot and stop due to the "wait for retrigger" flag. - The effect can be triggered multiple times, as long as it is given enough time to complete between triggers.
Advanced effect: Alien teleport
See also:
env_beam •
ambient_generic •
info_target •
env_sprite •
multi_manager •
monstermakerYou may have seen it before many times in half-life, I'm talking about the beam effect that is used when an alien is spawned. This one is a lot easier to make than the shockwave.
Here are the entities required to create it:
- 1 monstermaker
- 1 env_beam
- 1 info_target
- 1 env_sprite
- 2 ambient_generics
- 1 multi_manager
- A trigger
- Create one
env_sprite
- Set the sprite name to any teleport effect you wish, for example: sprites/c-tele1.spr sprite.
- Set the Render mode to: Additive
- Set the Scale value as desired.
- Create an
ambient_generic
or two to create a teleport sound.- The debris sound folder contains good teleporting sounds, I combined debris/beamstart7.wav and debris/beamstart2.wav.
- Create a
monstermaker
entity- Set the Monster to the one you wish to spawn.
- Make sure you place it inside the
env_sprite
so it looks right. - Place it inside the
env_sprite
.
- Create an env_beam` entity
- Tick the flags: Toggle, End Sparks, Decal End
- Set the properties:
- Color: Green
- Life: 0.5
- Width of beam: 16-20
- Amount of noise: 0-60
- Sprite name: sprites/lgtning.spr
- Strike again time: -0.5
- Create an
info_target
- Make it the starting entity for the
env_beam
(don't create any ending entity). - Place it inside the
env_sprite
.
- Create a
multi_manager
- Make it trigger the
env_beam
, ambient_generic
, env_sprite
and monstermaker
all at the same time. - Don't forget to toggle the
env_beam
off with the same multi_manager
, simply add the same env_beam
value but 1 second later. - If the
monstermaker
has more than one monster, don't forget to toggle it off with the multi_manager
as well.
To recap:
- The
multi_manager
triggers the env_beam
, ambient_generic
, env_sprite
for the visual and audio effects. - The
multi_manager
also triggers the monstermaker
to spawn the monster. - The
multi_manager
then triggers the env_beam
and monstermaker
a second time to turn them off again. - The effect can be triggered multiple times, as long as it is given enough time to complete between triggers.
Thanks Skals.
This website is awesome!