Flagrun for TF2?

Discussion in 'Mapping Questions & Discussion' started by Brandished, Jul 8, 2008.

  1. Brandished

    Brandished L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    293
    Using the KOTH option in the flag properties, I managed to recreate a buggy prototype of my favorite TFC game-modes for TF2, Flagrun. You can download it here. For those who haven't played the original Flagrun:

    [​IMG]

    Known problems:

    The Multiple Flag Pick-Up Bug (MFPUB):

    There is a bug with the teamflags that shows up when there are multiple, capable flags available to a team during a round. A player can pick up an unlimited number of flags, but they can only get rid of the last flag they picked up. All previous flags a player has picked up before the last will stay with them even if they die, run into a spawn area, run over a cap area, or the round is reset. The only way I've found to remove the "extra" flags from a player is to reload the map entirely, the "kill" command does not work on flags after they have been picked up. I've nicknamed this map Death-Run due to all kill triggers I had to put in to keep the MFPUB from occurring.


    No scoring system, broken sound:

    Valve also never finished implementing the alternate flag game-play modes, so there isn't really a working scoring for any of the modes, nor any sound system set up for them either. I can't fix the scoring system as there no way to directly award points other then the "rounds won" tally. As the ambient_generic entity is rather broken and has no filter options so the sound will only play for a certain player or team, I've only managed a partial work around for the sound system: a barely audible sound that plays from one location.


    Weird lighting on moving doors:

    As you might have noticed if you played the map, the platforms that cover the capture locations for Intel have odd lighting on them. This is because the doors in the map all had their lighting calculated when they were in the raised position. At first I tried having them lighted in the lowered position, but then there undersides were completely black, which was much more noticeable. I'm still trying to find a better set-up to indicate an available drop point for the flag.


    The questions:

    Why kill someone after dropping the Intel?

    To win the round, a team had to have all four flags in their possession, and flags can be stolen at any time after they have been captured. I had dropped flags instantly return to the center of the map mainly to prevent the MFPUB from occurring, but also to give a team more incentive to protect their flags. The problem was that with the instant return for flags, a single player could reset any progress the other team had made towards winning the round by running into their base and picking up and dropping all the flags they had captured, all the dropped flags would instantly be returned to the center. To prevent this, I added an output to the flags to kill players when they were dropped. I believe for this same reason, in Team Fortress Classic (for HL1), when playing a flagrun map, it was not possible to drop flags at all.


    Why bother trying to re-create flag-run in the first place?

    As I've mentioned, Flagrun was my favorite game mode for TFC and there isn't a current game mode option for TF2 that really matches it's mechanics. With all the current CTF and CP maps out there it starts to get difficult to create a really unique gameplay style for your map that hasn't been done at least 2 or 3 times already, I wanted something that would really set itself apart. I thought if I could make a mostly working flagrun map for TF2 and generate enough interest in it, Valve might even fix up the broken alternate flag modes and add a neutral skin for the flag.


    Why post the prototype map and vmf?

    I've just run into so many problems working on this map idea for TF2 that I'm considering giving up on it entirely, maybe soemone might know something I don't, if not that, then at least someone else might find something useful for there map idea based on my set-up. With all the workarounds I had to use with the way the properties for scoring, HUD elements, and other entities are set up in Hammer, It has me wondering if either Valve doesn't actually want anything other then the generic map set-ups with systems and event sounds matching those used in the stock maps, or, that the code base for Hammer and the Source Engine was so broken/unorganized it required tons of specially written work-around mod code just to get each of the TF2 entity settings to work to begin with.
     
  2. TheDarkerSideofYourShadow

    TheDarkerSideofYourShadow L10: Glamorous Member

    Messages:
    792
    Positive Ratings:
    143
    As far as picking up multiple flags, I saw a fix for that on these forums. I *believe* it has something to do with parenting a trigger to each flag, so that when a person enters that area they drop their current flag (or is it returned?). Anyways, that might help you would.
     
  3. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
  4. Brandished

    Brandished L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    293
    Thanks for the replies. Haven't seen any new posts from DrHaphazard or spaceweasels in a while, let alone several of the other people in that thread.

    I ended up doing something similar in my map to what was described in those threads... wish I would have searched the forums when I started working on this, it would have saved me some time.

    Anyways, I'm not so sure the solutions mentioned would work, though I'll experiment to be sure. I had my flags set to be killed "OnDrop" after 0.01 seconds, but the problem I ran into was melee battles between flag carriers, if one carrier melee killed the other, they would picks up the dropped flag before the kill kicked in. I even tried with a 0 second kill and had the same result, the flag was picked up by the other carrier before the kill went through and removed the flag.

    The workaround I used in my map was having the flag carriers surrounded by a death trap that only kills other flag carriers, preventing two flag carriers from getting close enough to each other to engage in a melee battle to begin with and thus preventing the melee kill pickup.

    I'll found a few posts relating to my sound problem as well when looking up the dropped intel wor around. One was sending sounds in via the "game_text_tf" entity. I might also give the env_soundscape workaround a try as well, but it seems like a lot of work for result that would only be slightly better then the workaround I'm using now, ie: everyone in the vicinity would still hear the sound.

    Also, long time no see, Pseudo.
     
  5. Brandished

    Brandished L5: Dapper Member

    Messages:
    234
    Positive Ratings:
    293
    All right, after some experimenting I can confirm that none of the flag pick prevention measures listed in that thread work. :( The first one won't work because of the melee kill problem I described above. The second method listed there made the flags glitch out, I still had the MFPUB, but I could cap the first flag I picked up an unlimited number of times, weird.

    Another problem is any object parented to a flag take on the flags properties; triggers, props, whatever. In other words, if you parented a large truck as a prop_dynamic to the flag, when you touched the truck, it would be the same as touching the flag, and you would be carrying a large truck on your back along with the flag due to the movement hierarchy system.

    One interesting note I discovered in the process was any flag siting inside a func_respawnroom brush cannot be picked up at all, so I think the code base to prevent the bug from occurring might already be present in TF2, just not in use.

    As for filtering sounds, nothing I tried worked, not env_soundscape_triggerable with a trigger_soundscape, not the game_text_tf method phatal described in another thread, nor did a trigger_multiple with a filter an output sent to a env_message. They all failed. I know it's possible though the game code, but I just don't see anyway using the entities currently available through hammer.

    Maybe there might be a workaround for the scoring sytem, sounds, and flags server side through a plug-in, I dunno. The only one of the 4 alternate flag modes that I've gotten to work so far, minus a scoring system, was attack-defend (think Avanti / Dustbowl from TFC).