[PREFAB] Single-flag Invade

Discussion in 'Mapping Questions & Discussion' started by VelvetFistIronGlove, Jan 28, 2010.

  1. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    This is a sample VMF for an Invade gamemode with the following features:

    • One neutral "invade" flag
    • Delayed flag respawn
    • Countdown sounds before flag respawn
    • Delayed return to neutral flag
    • Delayed return to neutral when dropped
    • Flag timer spins down to neutral
    • Flag never returns until captured

    The delayed flag respawn is done by spawning the flag in an inaccessible hidden room directly below the desired flag home; a point_teleport is placed where the desired flag home is. A logic_auto triggers the point_teleport so the flag is immediately accessible. On capture, a logic_relay relay_flag_respawn will teleport the flag after a 20 second delay; it also triggers countdown sounds up to then.

    The delayed return to neutral when the flag is dropped is achieved with a timer, timer_flag_neutralise. When the flag is dropped, the timer is started, and the flag return time is set to 3.01 seconds. The timer fires after 3 seconds; it makes the flag neutral and increases the flag return time to essentially infinite (68 years!).

    To disable the respawn delay: Remove the logic_auto, the point_teleport (and all outputs sent to it), relay_flag_respawn, and move the flag up to its desired home point.

    To disable the delay before neutral: Change timer_flag_neutralise into a logic_relay (updating its name accordingly for your sanity), remove the Enable/Disable output sent to it, and have the flag OnDrop send it the Trigger input.

    Download it here.

    Note that with Invade mode there is still the issue of the announcer sounds missing. This thread has a pack of replacement sounds, but there may be issues with cached sounds carrying over between maps. I am investigating this and will update this post with details when I have them.
     
    • Thanks Thanks x 6
  2. The Political Gamer

    aa The Political Gamer

    Messages:
    4,468
    Positive Ratings:
    1,684
    Ah thanks for this saved me lots of time. :p
     
  3. Grim Tuesday

    aa Grim Tuesday

    Messages:
    1,257
    Positive Ratings:
    371
    I would like it so instead of going into your hidden place, back to the middle in 30 secs (15 'till nuetral). How do I do this?
     
  4. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    When the flag is dropped? Follow the "To disable the delay before neutral" instructions, then change the flag return time to 30 seconds, and in the flag properties set NeutralType to 2 "Half of the return time". Then add an output to the flag: OnReturn -- teleport_flag_respawn -- teleport.
     
  5. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
    What's the easiest way to stop the announcer from counting down after the round has ended?
    Would I be right in guessing that you send the logic_relay a disable command onRoundWin and an enable onNewRoundMulti?

    EDIT: Hmmmm, I tried sending a disable command to the logic_relay from the gamerules entity (onWonByTeam1 and onWonByTeam2) and the sounds still played after the round was won. :S
     
    Last edited: Feb 18, 2010
  6. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,568
    You'd need to kill them.

    They should reset on new round/multi-round, but don't quote me on that.
     
    • Thanks Thanks x 1
  7. Boylee

    aa Boylee pew pew pew

    Messages:
    1,068
    Positive Ratings:
    631
    OK thanks, Unfortunately I just compiled and pak'd chicane_a8 so I'll have to give that a try in the next compile I do.