[PREFAB] Single-flag Invade

Dec 25, 2007
566
439
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.
 
Nov 14, 2009
1,257
378
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?
 
Dec 25, 2007
566
439
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.
 

Boylee

pew pew pew
aa
Apr 29, 2008
1,068
709
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: