Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

Reply
 
Thread Tools Display Modes
Old 01-16-2013, 10:30 PM   #1
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Toggle trigger_ff_clip?

I want to make it so my flag can't be grabbed through lasers while security is up.

I looked at phantom_r's .vmf in hammer and it uses a func_brush.

But I can't figure out how to make the func_brush solid without blocking a demoman's pipes.

When I use a trigger_ff_clip I can make it block a specific team, and let a demoman's pipes in, but I can't enable/disable it with the security toggles.

So how do I make a security controlled clip brush that still lets a demoman's pipes through?
ian.de is offline   Reply With Quote


Old 01-16-2013, 11:47 PM   #2
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.
A perfect security solution using trigger_ff_clip is definitely possible (non-exploitable by the offense and doesn't get the defense stuck in it), but no map has done it yet. I'll see what I can do when I get home.
__________________
#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
squeek. is offline   Reply With Quote


Old 01-17-2013, 12:58 AM   #3
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Quote:
Originally Posted by squeek. View Post
A perfect security solution using trigger_ff_clip is definitely possible (non-exploitable by the offense and doesn't get the defense stuck in it), but no map has done it yet. I'll see what I can do when I get home.
Yes, using the "aardvarkdoorhack" security door relay, I tried every I/O modifier I could think to use on the trigger_ff_clip brush.

Example: I tried to "Disable" the clip brush on open and "Enable" the clip brush on close.

Or "TurnOff" the clip brush on open and "TurnOn" the clip brush on close.

But these I/O commands don't seem to register with trigger_ff_clip entities.

Thanks for taking a look squeek, I thought phantom already had implemented something similar but I was mistaken.
ian.de is offline   Reply With Quote


Old 01-17-2013, 08: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 08:39 AM.
squeek. is offline   Reply With Quote


2 members found this post helpful.
Old 01-18-2013, 11:44 PM   #5
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Thanks for your hard work Squeek!
ian.de is offline   Reply With Quote


Old 07-06-2013, 05:41 AM   #6
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Squeek I hate to drudge this topic back up but I can't for the life of me get this LUA to work with the aardvark_doorhack style Security system. When I load up the map in FF I can choose out of four teams (instead of two) and when I select a team all of the classes are greyed out (so the LUA is breaking the map).

My current security system (the same used in sd2 and destroy, etc.):

A trigger_ff_script (red_aardvarksec) opens a func_door (red_aardvarkdoorhack) that handles all the outputs. Can we make it so the func_door (red_aardvarkdoorhack) toggles the trigger_ff_clip, instead of a button doing the toggles like it does in your previous solution?

I tried to mess with your code to achieve the desired effect but I ended up breaking something.

Last edited by ian.de; 07-06-2013 at 05:42 AM.
ian.de is offline   Reply With Quote


Old 07-06-2013, 06:44 AM   #7
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.
Quote:
Originally Posted by ian.de View Post
Squeek I hate to drudge this topic back up but I can't for the life of me get this LUA to work with the aardvark_doorhack style Security system. When I load up the map in FF I can choose out of four teams (instead of two) and when I select a team all of the classes are greyed out (so the LUA is breaking the map).
When this happens, it means there will be an error logged in the console. Load the map and look in the console for [SCRIPT] error lines.

To use any other system, just call the ClipSec_Event_SecurityOn and ClipSec_Event_SecurityOff functions for each team in the correct place. For ff_aardvark, that'd be ClipSec_Event_SecurityOn in blue_aardvarksec:ontouch( touch_entity ) and red_aardvarksec:ontouch( touch_entity ) and ClipSec_Event_SecurityOff in aardvarksecupred() and aardvarksecupblue().

Aardvark's system is weird for sure though. The door is not necessary when using Lua (all Hammer outputs that get sent through the door can be called through Lua, and it's more foolproof that way [things won't get stuck on/off on restartround/prematch ending]).
__________________
#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.; 07-06-2013 at 07:17 AM.
squeek. is offline   Reply With Quote


Old 07-06-2013, 07:02 AM   #8
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Yeah I'll bite the bullet and just learn LUA scripting, there's no reason I've waited this long, thanks man
ian.de is offline   Reply With Quote


Old 07-06-2013, 07:22 AM   #9
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.
Quote:
Originally Posted by ian.de View Post
Yeah I'll bite the bullet and just learn LUA scripting, there's no reason I've waited this long, thanks man
I take it the main thing you want from aardvark's sec is using a trigger instead of a button for getting security down? If so, I can add an example of that in ff_dev_security.
__________________
#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.; 07-06-2013 at 07:22 AM.
squeek. is offline   Reply With Quote


1 members found this post helpful.
Old 07-06-2013, 05:43 PM   #10
ian.de
 
Join Date: Aug 2009
Gametype: Capture the Flag
Posts Rated Helpful 14 Times
Quote:
Originally Posted by squeek. View Post
I take it the main thing you want from aardvark's sec is using a trigger instead of a button for getting security down? If so, I can add an example of that in ff_dev_security.
That would be most gracious of you
ian.de is offline   Reply With Quote


Old 07-06-2013, 11:45 PM   #11
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 version with triggers (same link as last time, I overwrote the file):

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

Name the triggers: red_security_trigger and blue_security_trigger. You can also use either func_buttons or triggers with this Lua; they will both work.

Definitely re-download to get the new Lua, because I changed up the layout a bit to try to make it clear what should be edited and what shouldn't. Just FYI, though, here's what I added to make the triggers work:



It's somewhat complicated, but, basically, I'm re-using the button onin and onout functions from base_shutdown for the trigger being touched/security going back up. This makes it so that any changes to base_shutdown will not be overwritten (like if we add/change something on the HUD). Note: there do not need to be func_button entities in the map for this to work.
__________________
#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.; 07-06-2013 at 11:55 PM.
squeek. is offline   Reply With Quote


1 members found this post helpful.
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 07:27 PM.


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