Talk:Env beam

From Valve Developer Community
Revision as of 10:07, 19 April 2008 by NykO18 (talk | contribs) (Decal End)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Cleanup tag

I just put the cleanup tag on the entity description for this article. Reason: It's extremely verbose and needs slimming down. Might come back later and do it myself if I have time. --Giles 04:40, 27 May 2006 (PDT)

cleanup performed. --Campaignjunkie (talk) 15:34, 29 Jul 2006 (PDT)

Previous discussion

...Thanks Ts2do, very good job of formatting it. --wisemx 17:05, 16 Aug 2005 (PDT)

I saw that the flags were forgotten, and I thought that the names from the Hammer properties box would be better than nothing. I don't know the bit values for these flags, or if they are called something else with SmartEdit off, but at least they're there if anybody would want to comment them later on. --Andreasen 18:20, 31 Jan 2006 (PST)

  • Re the "Ring" spawnflag: looking at the SDK source code (/dlls/EnvBeam.cpp), it looks like this will only work if both the start and end entities (LightningStart and LightningEnd) are both moving entities, e.g. parented to something. It won't work if either entity is, say, a non-parented info_target.
Perhaps someone could test it out. Quite why they've made it this way I have no idea. --Rof 08:28, 1 Feb 2006 (PST)
You're right, I tested it on Alyx's Eye attachment points. (Very cool) --wisemx 08:35, 1 Feb 2006 (PST)
I have been researching env_beams for two days straight now, and among others discovered that I made a mistake about the Ring flag. It has to be brush entities. Simple stationary nodraw-textured brushes will do fine. --Andreasen 15:00, 1 Feb 2006 (PST)
...and btw, I don't know anything about how to target attachment points, so you'll need to confirm that later (preferably with instructions on how to target them), because I've only gotten beam rings to work with prop_physics and brushes, not npcs. Edit: Okay, I got to stop being wrong. NPCs works just fine, but I'm still at a lost on how to target attachment points. (I can only target the feet of Alyx.) --Andreasen 08:22, 6 Feb 2006 (PST)
Open Alyx.mdl in hlmv...then go to the attachments tab—ts2do 13:53, 6 Feb 2006 (PST)

If you get the Decal End effect to work nicely, please explain how. I've tried everything with it by now, and is starting to think Valve never paid it much attention when writing Source. --Andreasen 15:00, 1 Feb 2006 (PST)

Apparently Gearbox got around the issue in Opposing Force when they were welding up doors, by creating an additional env_laser beam whose only purpose was to place the scorch decal with End Decal, so I think the env_beam End Decal didn't even work well in the days of Half-Life, and that perhaps the env_laser End Decal will work better. I'll get to env_laser as soon as I'm finished researching env_beam. --Andreasen 10:28, 2 Feb 2006 (PST)

I'm at the limits of my sanity with this entity. Say you put an env_beam striking from a solid func_brush, and then put an env_beam striking from a shotgun next to it, not only does the strikings from the func_brush limit the length of its damage from the endpoint and back, but it also limits that same range for the neighbouring shotgun! What's going on?! Any theories besides this being some kind of bug? --Andreasen 07:16, 3 Feb 2006 (PST)

After some more research I've reported this as a bug, as the "collision area" of the env_beam and func_brush didn't update between compiles. I decided to research the standard info_target beams instead, and will probably finish formulating my conclusions tomorrow. --Andreasen 19:57, 5 Feb 2006 (PST)

By the way, here's how the check is done to determine if the beam is shown:

If both the start ent and the end ent are not static:

bool IsStaticPointEntity( CBaseEntity *pEnt )
{
	if ( pEnt->GetMoveParent() )
		return false;

	if ( !pEnt->GetModelIndex() )
		return false;

	if ( FClassnameIs( pEnt, "info_target" ) || FClassnameIs( pEnt, "info_landmark" ) || 
		FClassnameIs( pEnt, "path_corner" ) )
		return true;

	return false;
}

If you simply replace your info_target entities with some other one such as info_target_gunshipcrash or path_track it will work —ts2do 13:59, 6 Feb 2006 (PST)

If it's shown? Do you mean the ring beams now? Sorry but I (personally) can't interpret C-code, so if there's anything wrong with the article I'm about to post in the next hour, feel free to correct me. --Andreasen 14:33, 6 Feb 2006 (PST)

Anyone know how to make a beam ring in the source code (not through Hammer)? I've successfully made straight beams but cannot get a ring to work. Here's what I've tried:

CON_COMMAND(h5_radius_debug, "")
{
     CBaseEntity *ent = gEntList.FindEntityByName(NULL, engine->Cmd_Argv(1), NULL);
     CBaseEntity *ent2 = gEntList.FindEntityByName(NULL, engine->Cmd_Argv(2), NULL);
     CBeam *beam = CBeam::BeamCreate("sprites/lgtning.vmt", 3.0);
     beam->AddSpawnFlags(SF_BEAM_RING);
     beam->EntsInit(ent, ent2); 
}

Thanks! --O 04:53, 12 Jul 2006 (PDT)



Deep knowledge about beams

In order to make the article more relevant, the following obscure facts were removed (if you would be terribly interested in them):

Specifying Points

Each specified point entity can be used as targets for several env_beams.

You can even blend two beams together totally without so much as a color flicker.

Helper Lines

If you specify entity names for both points and click Apply, Hammer will draw a helping line between the two named entities to confirm that a beam will run between them in-game. (While normally always shown in the 3D view, this line is only displayed in the 2D views if the env_beam entity is also shown in it.) (If groups are used, only one line might be drawn from one of the start entities to one of the ending entities. It won't show if you name two entities before you specify the point entity.) When you select an env_beam, its line will also light up.

When specifying multiple ending or starting entities, the first spawn of the beam will be at the line shown in Hammer.


Penetration and Damage

(Please note that due to a somewhat unforeseeable bug with using brush entities, the part about beam damage will mainly cover env_beam damage emitted from the more reliable info_target entities.)

Entitys that can block beam damage includes prop_physics emitters blocking its own beam, but apparently not solid func_brush emitters (but this may be a bug).

Ring Beams

Ring beams using func_trains can be seen in Half-Life 1 in Xen around spires, and can also be used to create expanding visual blast waves.


Decal End

When I tested the Decal End flag, a long time ago, the effect was so ugly that it couldn't possible be used, but now that Episode One has added a decal option, someone with Episode One installed (which excludes me) should see if the Decal End flag can now be put to good use. --Andreasen 23:12, 11 Sep 2006 (PDT)

I know this one is quite old, but I don't manage to use this flag in Portal neither. Instead of cool burn effects where the laser end, I get ugly decals of various scale. Some of them aren't even translucent, and some others are larger than 64 units when applied. I'd like to know if there's a way to do it, with some sort of hack or whatever... By the way, I tried with both env_beams and env_laser --NykO18 10:06, 19 Apr 2008 (PDT)