Prerequisite: The env_beam entity
Ok, for most of this to go off as smoothly as possible, I'm going to explain some things to those of you that are new to the env_beam. Those who are familiar with the entity may safely skip this section.
An env_beam is an entity that draws a beam between two points. You make the start and end points, usually info_targets for something like steam. Then you make the env_beam, which you set to use those targets as its start and end points. The beam itself is what is rendered in-between these points.
How it Works:
We have established that an env_beam renders a beam between two points. Now here comes the magic: the game can generate a beam to display, or you can supply it with a sprite to use. And since the top and bottom of the beam are anchored at these two points, the sprite is as well.
How To Make Smoke:
Ok, you will need three entities for this:
Name one of the info_targets
and the other
. Now in the env_beam, add
as the starting point (don't worry, the smoke will still travel upward), and
as the ending point. You should end up with something similar to this: In the env_beam, you need to set some more things up:
- Brightness : How "solid" you want the sprite. A value around
200 should make for some nice smoke.
- Beam Color : This will recolor the sprite. Gray is good for smoke (pink smoke is kinda cool looking though...).
- Life : Set this to
0 , for infinite, unless you want your smoke to disappear after a time.
- Width of Beam : You can make the sprite wider or thinner. I used
- Sprite Name : This is what sprite is displayed. I used
sprites/lgtning.spr . Believe it or not, it looks like smoke when used this way.
- Texture Scroll Rate : This is how fast the sprite scrolls down the beam. For smoke shooting out of a pipe or something, you would use a high number. As my smoke is just meandering, I used
- Frames Per 10 Seconds : Surprisingly, I haven't been able to get sprites to play any animations. Which means this trick is mostly for scrolling things, like smoke.
Now, in the flags section check
. The latter key will make the smoke fade at the top, really enhancing the effect.
Alright, now you know the basics for making sprites with env_beams. Play with it a bit, you may surprise yourself with what you can find. For reference, the Collective entity guide on env_beam can be found here (Link: index.php?ent=env_beam&game=hl)
I have included an example RMF (Link: sprite.zip)
for you to look through. It has an env_beam sprite and a normal sprite, for comparison purposes.
I'll start of with a graphic example. Imagine our dramatic industry map has some steam vents, like pictured below: As the player inches towards the vents, the hiss of the steam fills his ears. Upon looking from an upward angle at the vents, they look like this: See that vent on the right? Has that happened to you? Yeah, happened to me too. Seems those darn sprites always face the player... and quite frankly, that?s only good for circular shaped sprites, not sprites that have to come from and go to a certain spot. Luckily, you can make sprites that don't turn on the vertical axis (like the vent on the left) and take advantage of some other wonderful features of the env_beam entity at the same time.