Fortress Forever

Go Back   Fortress Forever > Community > General Discussion

Reply
 
Thread Tools Display Modes
Old 03-14-2011, 10:06 AM   #1
FF_Team
Fortress Forever Staff
 
FF_Team's Avatar
 
Join Date: Nov 1999
Posts Rated Helpful 71 Times
Dev. Journal: squeek. (2011-03-14)

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):
Quote:
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
Quote:
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:
Code:
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?).

Last edited by squeek.; 03-14-2011 at 10:13 AM.
FF_Team is offline   Reply With Quote


Old 03-14-2011, 11:45 AM   #2
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW
Gametype: Any/CTF
Posts Rated Helpful 41 Times
very useful for warpath CP1 & 5 where I created an sg defence point which cannot see into the capture zone without this. So I'm looking forward to that

nice one squeek. Sounds like complicated work
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)

Last edited by Elmo; 03-14-2011 at 11:45 AM.
Elmo is offline   Reply With Quote


Old 03-15-2011, 09:49 AM   #3
moosh
WhenNailGrenWillOut?
Beta Tester
 
moosh's Avatar
 
Join Date: May 2009
Gametype: mp_prematch
Affiliations: [:)] - Frag Happy, babe|
Posts Rated Helpful 29 Times
Very informative.

Nice work hlstriker and squeek.
__________________
[[ ff_hotfudge - bhop_theonlyone ]]
"As the the new year approaches I await for it like an case of explosive fecalomania otherwise know as diareha or the massive shits. I am gripping the sides of the toilet as my stomach produces the first hollow thud out of the anus of the year to come." DarkeN_HellspawN
moosh is offline   Reply With Quote


Old 03-15-2011, 03:43 PM   #4
Elmo
Gets tickled by FF
Fortress Forever Staff
 
Elmo's Avatar
 
Join Date: Jun 2007
Location: UK
Class/Position: Med Solly HW
Gametype: Any/CTF
Posts Rated Helpful 41 Times
I might be a little dumb here but can we clip by class too squeek.. if not can we implement that flag too? I've got ideas as to how it could be useful
__________________
Support FF:
Done: ff_monkey
Done: ff_bases
Done: ff_warpath
Forever Doing: ff_medieval (beta#99999999)

Last edited by Elmo; 03-15-2011 at 04:04 PM.
Elmo is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:29 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.