Multiple flags

Discussion in 'Mapping Questions & Discussion' started by Hannibal, Sep 16, 2008.

  1. Hannibal

    Hannibal L1: Registered

    Messages:
    12
    Positive Ratings:
    0
    I've looked everywhere for an answer to this but can't seem to find one.

    I have an idea for multiple flags on a ctf map. The final flag is available to all teams.

    I need to know how to make the flags that are capped not respawn and how to only unlock the final flag, which both teams can grab, only available when a team has reached it's limit of normal flags.

    I'll run an example in case that made no sense.

    we have 3 red flags and 3 blue flags and one flag that anyone can cap. The final flag is only availble to blu when they have capped all the other 3 flags, same to red.

    I need the original 3 flags not to respawn, I don't want to confuse players into not knowing what flags are available for them.

    I need the final flag to be cappable by a team only if they have the other three flags. The important bit is that if red caps 3 and blu only has 2 then bl can't steal the final flag.

    I'm really sorry if this all makes no sense, very tired and trying to work out what to do.

    Any help is greatly appreciated.
     
  2. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    What you can do is, in the first two flags (red and blu's) create an output like so:

    Named: OnCapture
    Target: (whatever you named your flags)
    Input: Disable

    This will disable the Intels when captured.

    As for the last flag, create a math_counter, one for each team, and set it's max value to 2. Back to the original flags now, create this input for all 4:

    Named: OnCapture
    Target: (Whatever you named your math_counter for that team)
    Input: Add
    Parameter: 1

    Now then, create a third flag for each team, but leave it start disabled. Back to your math_counter(s) now, add this to them:

    Named: OnHitMax
    Target: (whatever you named your final flag)
    Input: Enable

    I'm 99% sure this will work for you.
     
  3. Brandished

    Brandished L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    298
    The problem with changing a flag's spawn location is when a flag was captured, it instantly returned to it's spawn location. The problem I ran into is there's an exploit via a player waiting at the flag's original spawn location and picking up the flag before a disable/kill command could go through to stop them from picking it up, this was with a zero second delay after the "OnCapture" output was triggered. They would "pick-up" the flag at it's original spawn point and the I/O chain would break, the flag they "picked up" would disappear, but the new flag I had set-up to be activated via an "OnCapture" output would never spawn/enable, and the round would become un-winnable.

    To work-around this for the time being I added a bunch of func_door's to block the flag's spawn location immediately after it was picked up. I uploaded an example map that used the workaround for my Flag Game Types page on the VDC a few weeks ago here:
    http://www.mediafire.com/?myzzzzstmjh

    Yet another excuse to pimp my flagrun map. :p
     
    Last edited: Sep 16, 2008
  4. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    34
    Yep, the func doors makes great sense. In addition to that, I would throw a hurt brush inside where the doors close (set to trigger once the doors close) in case a player is in there and can't get out before the doors close. That way it kills him. I know you could just use the console to kill yourself or if you have auto kill set up when you change class but not everybody knows about those options. Basically this would prevent the dumbshit from being stuck in that caged area for the duration of the map :)