View Single Post
Old 01-17-2013, 07:35 AM   #4
squeek.
Stuff Do-er
Lua Team
Wiki Team
Fortress Forever Staff
 
squeek.'s Avatar
 
Join Date: Mar 2007
Location: Northern California
Class/Position: Rallygun Shooter
Gametype: Conc tag (you just wait)
Affiliations: Mustache Brigade
Posts Rated Helpful 352 Times
Send a message via AIM to squeek.
Alright, here's a working example. It's not very clean, but it functions properly.

http://www.fortress-forever.com/publ...v_security.zip

It uses a trigger_ff_clip to block players, a non-solid func_brush for the visuals, and a trigger_hurt 1 unit inside the trigger_ff_clip to kill any offense that is inside the security when it goes up (so they don't get stuck inside). This also means that offense doesn't get killed if they touch the lasers from the outside when security is up; if you don't like that, just extend the trigger_hurt to overlap with the trigger_ff_clip.

The Lua code is somewhat complex, but you should be able to use it without modifying much (put any custom OutputEvent()'s or anything like that in the ClipSec_Event_SecurityOn/ClipSec_Event_SecurityOff functions at the bottom).

The func_button approach I used I'm not very fond of (I've never made a security map, but I think it's ill-advised to have the func_button reset delay dictate how long security goes down for as that should be controlled by Lua ideally). That is something that can really be improved.

I'll look into adding a Disable and Enable input for trigger_ff_clips, as that would make this whole thing immensely cleaner, easier, and more intuitive.
__________________
#FF.Pickup ยค Fortress-Forever pickups

My Non-official Maps
Released FF_DM_Squeek - FF_2Mesa3_Classic - FF_Siege_Classic
Beta FF_Myth - FF_Redlight_Greenlight

Sick of the people on the internet, always moanin'. They just moan.
- Karl Pilkington

Last edited by squeek.; 01-17-2013 at 07:39 AM.
squeek. is offline   Reply With Quote


2 members found this post helpful.