Developer Journal: squeek.
There is a criminally underused entity in FF map making: the trigger_ff_clip. Although, its rarity is forgivable because it has never really been implemented correctly. Since FF's initial release, trigger_ff_clip could not block players and their hitscan bullets separately, which meant that players of one team could potentially stand behind it, invincible, while shooting enemies outside of it.
What's that thing?
Well, hlstriker changed all that. He dove into the trace/collision code and got a few very notable things done: fixed the long-standing trigger_ff_clip inconsistency, and added teammate soft-clipping. Since then, I have added some more capabilities to trigger_ff_clip. It can now optionally block players, bullets, grenades, projectiles, buildables, buildable weapons, backpacks, flags (info_ff_scripts), and spawn turrets. Also, In doing so, I fixed a few bugs and made SGs/spawnturrets tracking a bit more consistent; they both will now correctly lock on to anything they can shoot at (playerclip brushes have always caused weird behavior).
So, now to the real reason behind this dev journal: how to use the new trigger_ff_clip that'll be released with 2.42.
A trigger_ff_clip entity is made by tying a world brush to an entity (Ctrl+T) and selecting trigger_ff_clip as the class. You then give it a name and Lua code handles the rest. The texture of the trigger_ff_clip can be anything that normally works on world brushes; it behaves like any other entity-tied brush (func_brush, for example). I have included a few standard clip brush definitions in base_teamplay.lua (almost every map uses base_teamplay). They should serve most general purposes.
Name your trigger_ff_clip one of the following to use these standard clip brushes (case matters, so make sure your entity names are all lowercase):
If you're more adventurous or need something more specific, here are all the clip flags available. Note that the generic clip flags (kClipPlayers, kClipGrenades, etc) are aliases for their ByTeam counterparts. This is to make the new system backwards compatible so that no current maps using trigger_ff_clip need to be reconfigured. Also, kClipInfoScriptByTeam is not implemented.
ClipFlags
Corresponds to a trigger_ff_clip flag
You define a trigger_ff_clip like so:
The team clip flags apply to any and all ByTeam flags added to the trigger_ff_clip. If no team clipflags are included, ByTeam flags will block all teams.
Hopefully these new trigger_ff_clips will both be helpful in protecting respawns and open up the possibility for weird and unique maps (invincible SG spots? constantly changing clip brushes? a ceiling detpack-only drop-point? spawnturret dodging skill maps?).
Discuss on the forums → View all developer journals
What's that thing?
Well, hlstriker changed all that. He dove into the trace/collision code and got a few very notable things done: fixed the long-standing trigger_ff_clip inconsistency, and added teammate soft-clipping. Since then, I have added some more capabilities to trigger_ff_clip. It can now optionally block players, bullets, grenades, projectiles, buildables, buildable weapons, backpacks, flags (info_ff_scripts), and spawn turrets. Also, In doing so, I fixed a few bugs and made SGs/spawnturrets tracking a bit more consistent; they both will now correctly lock on to anything they can shoot at (playerclip brushes have always caused weird behavior).
So, now to the real reason behind this dev journal: how to use the new trigger_ff_clip that'll be released with 2.42.
A trigger_ff_clip entity is made by tying a world brush to an entity (Ctrl+T) and selecting trigger_ff_clip as the class. You then give it a name and Lua code handles the rest. The texture of the trigger_ff_clip can be anything that normally works on world brushes; it behaves like any other entity-tied brush (func_brush, for example). I have included a few standard clip brush definitions in base_teamplay.lua (almost every map uses base_teamplay). They should serve most general purposes.
Name your trigger_ff_clip one of the following to use these standard clip brushes (case matters, so make sure your entity names are all lowercase):
clip_blue - clips everything except blue players (blue team "owns" the clip brush)
clip_red - clips everything except red players (red team "owns" the clip brush)
clip_yellow - clips everything except yellow players (yellow team "owns" the clip brush)
clip_green - clips everything except green players (green team "owns" the clip brush)
block_buildables - blocks buildables and buildable weapons
block_buildablepathing - blocks buildables but not buildable weapons
block_buildableweapons - blocks buildable weapons but not buildables
block_spawnturrets - blocks spawnturrets (turrets can't see or shoot through this)
block_nonplayers - blocks everything except players
block_backpacks - blocks backpacks
block_flags - blocks info_ff_script entities (flags are info_ff_scripts)
If you're more adventurous or need something more specific, here are all the clip flags available. Note that the generic clip flags (kClipPlayers, kClipGrenades, etc) are aliases for their ByTeam counterparts. This is to make the new system backwards compatible so that no current maps using trigger_ff_clip need to be reconfigured. Also, kClipInfoScriptByTeam is not implemented.
ClipFlags
Corresponds to a trigger_ff_clip flag
ClipFlags.kClipTeamBlue
ClipFlags.kClipTeamRed
ClipFlags.kClipTeamYellow
ClipFlags.kClipTeamGreen
ClipFlags.kClipAllPlayers
ClipFlags.kClipAllGrenades
ClipFlags.kClipAllProjectiles
ClipFlags.kClipAllBullets
ClipFlags.kClipAllBuildables
ClipFlags.kClipAllBuildableWeapons
ClipFlags.kClipAllBackpacks
ClipFlags.kClipAllInfoScripts
ClipFlags.kClipAllSpawnTurrets
ClipFlags.kClipAllNonPlayers
ClipFlags.kClipPlayersByTeam or ClipFlags.kClipPlayers
ClipFlags.kClipGrenadesByTeam or ClipFlags.kClipGrenades
ClipFlags.kClipProjectilesByTeam or ClipFlags.kClipProjectiles
ClipFlags.kClipBulletsByTeam or ClipFlags.kClipBullets
ClipFlags.kClipBuildablesByTeam or ClipFlags.kClipBuildables
ClipFlags.kClipBuildableWeaponsByTeam or ClipFlags.kClipBuildableWeapons
ClipFlags.kClipBackpacksByTeam or ClipFlags.kClipBackpacks
ClipFlags.kClipSpawnTurretsByTeam or ClipFlags.kClipSpawnTurrets
ClipFlags.kClipNonPlayersByTeam or ClipFlags.kClipNonPlayers
You define a trigger_ff_clip like so:
clip_example = trigger_ff_clip:new({ clipflags = {
ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamRed,
ClipFlags.kClipTeamYellow, ClipFlags.kClipTeamGreen,
ClipFlags.kClipAllNonPlayers} })
The team clip flags apply to any and all ByTeam flags added to the trigger_ff_clip. If no team clipflags are included, ByTeam flags will block all teams.
Hopefully these new trigger_ff_clips will both be helpful in protecting respawns and open up the possibility for weird and unique maps (invincible SG spots? constantly changing clip brushes? a ceiling detpack-only drop-point? spawnturret dodging skill maps?).