- Dec 25, 2007
- 566
- 439
This is a sample VMF for an Invade gamemode with the following features:
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.
- 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.