CTF Invade and other modes

Dec 25, 2007
566
439
If Valve fixes the scoring in Invade mode, I'll be using it, and create a sample VMF; but until then it's not usable for the contest, so follow the instructions in grazr's link.
 

Boylee

pew pew pew
aa
Apr 29, 2008
1,068
709
The modified ctf config does work well, but I've noticed a bug where it reverts to two intel pointers on the HUD. I'm not sure what causes this at the moment so I don't know how to remedy it.

There's a vmf of the ctf mode modded to play invade here, but it's the one I used for testing so it comes with a couple of caveats.

  • I have it set up so when the intel is being carried it uses the neutral carried skin.
  • there's two info_teleport entites so that the intel can be teleported somewhere hidden for a cool-off period
  • and lastly theres two testing entities in it, a logic_auto and a point_servercommand. Don't copy these across to your map.

This is only a stop-gap really, until valve get around to fixing the invade mode. It should at least help anyone wanting to test invade ctf gameplay on their map.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
The modified ctf config does work well, but I've noticed a bug where it reverts to two intel pointers on the HUD. I'm not sure what causes this at the moment so I don't know how to remedy it.
I've seen that problem whenever there is a single neutral intelligence that gets disabled at some point. Although if you're teleporting it, I guess you're already using the workaround to avoid disabling it?
 
Dec 25, 2007
566
439
Disabling the flag will cause the HUD to switch to two-flag mode and not point to the flag anymore.
Quote from the OP there (concurring with Pseudo). I have only seen this happen when the intel was disabled; in ctf_desind_a2, I instead use two point_teleports: one where the flag spawns, one directly below it in a room inaccessible to players. So I teleport it to the inaccessible one on capture, and teleport it back to the first ten seconds later.
 
Dec 25, 2007
566
439
Good news: Eric Smith reckons they'll have fixes in place in the next update:
Eric Smith said:
We'll have fixes for the things you reported (all 4 of them) in the next TF2 update. You'll need to update your .fgd file with the red sections in the block below. Let me know if you have any other problems with your "Invade" CTF maps.

Eric Smith
Valve

The FGD changes he mentions are two new properties that will be coming to item_teamflag:
Code:
      NeutralType(choices) : "Neutral flag (Invade)" : 1 : "Only used for the Invade game type. When should a dropped Invade flag become neutral?" =
      [
            0 : "Never"
            1 : "Default (30 seconds)"
            2 : "Half of the Return Time."
      ]
      ScoringType(choices) : "Scoring style (Invade)" : 0 : "Only used for the Invade game type. When the Invade flag is captured, how should the team be rewarded? 'Score' is the team score in the scoreboard. 'Capture count' is the team capture count used in the HUD." =
      [
            0 : "Increment score"
            1 : "Increment capture count"
      ]
 

Nutomic

L11: Posh Member
Feb 7, 2009
888
177
Where exactly in the fgd does this have to be?

And which things are fixed with this, which do still need a workaround?
 
Dec 25, 2007
566
439
No point putting it in the FGD yet, since the update isn't out and they wouldn't do anything. The four things Eric mentions are the four bugs I detailed in this post. The two new properties address #1 and #2, while #3 and #4 are fixes to broken visuals so wouldn't involve any entity differences
 

Undies

L1: Registered
Dec 24, 2009
45
9
Suppose this may be as good as place as it would be to start my own thread ... so I'll ask here since it's related :bored:

It was touched on earlier in the thread, but not really explained; I was curious how I might disable/alter the flag cap count without using a point_servercommand and with "CTF" game mode, rather than invade. I'm not entirely accustomed to TF's entity or I/Os yet, but using Invade cause more issues that I would have to work around. This is for a CP/CTF hybrid map, this is not for the contest.

EDIT:
So if you don't want the flag to instantly respawn ready for pickup, make an inaccessible room with a point_teleport in it to teleport the flag to on capture (and/or on return); then after the appropriate delay, teleport it to another point_teleport where you want the flag to be picked up from.
Btw, you'd only need one point_teleport and a delay to send it there after cap/return, just have the flag spawn in the inaccessible room and a logic_auto to send it out on round start. Saves you one entity :p
 
Last edited:

Boylee

pew pew pew
aa
Apr 29, 2008
1,068
709
I've seen that problem whenever there is a single neutral intelligence that gets disabled at some point. Although if you're teleporting it, I guess you're already using the workaround to avoid disabling it?

I never knowingly set the intel to be disabled. All I changed from standard ctf is the scoring workaround posted by SuperSandvich and added two point_teleports to hide the intel for 12 seconds. If I find out what's actually breaking the HUD I'll report it here.

Btw, you'd only need one point_teleport and a delay to send it there after cap/return, just have the flag spawn in the inaccessible room and a logic_auto to send it out on round start. Saves you one entity :p

That's actually a good point. You'll need to teleport it onRoundStart too though or you'll have a permanently hidden intel :lol:

EDIT: Good work on getting in touch with VALVe VFIG. Does that mean we'll actually be able to use the invade mode on the flag without problems?
 
Last edited:

Zeewier

L9: Fashionable Member
Sep 20, 2008
619
262
I've also requested some things to make my gamemode work better (Fixes a few possible exploits):

With a reply (within 24 hours! <3 Eric)

Code:
@PointClass base(Targetname, Parentname, GameType, TeamNum, EnableDisable, Angles) studio("models/flag/briefcase.mdl") = item_teamflag : "Team Fortress flag entity."
[
                ReturnTime(integer) : "Return time (in seconds)" : 60 : "Length of time (in seconds) before dropped flag/intelligence returns to base."
               
                NeutralType(choices) : "Neutral flag (Invade)" : 1 : "Only used for the Invade game type. When should a dropped Invade flag become neutral?" =
                [
                                0 : "Never"
                                1 : "Default (30 seconds)"
                                2 : "Half of the Return Time."
                ]
               
                ScoringType(choices) : "Scoring style (Invade)" : 0 : "Only used for the Invade game type. When the Invade flag is captured, how should the team be rewarded? 'Score' is the team score in the scoreboard. 'Capture count' is the team capture count used in the HUD." =
                [
                                0 : "Increment score"
                                1 : "Increment capture count"
                ]
               
                flag_model(string) : "Model" : "models/flag/briefcase.mdl" : "The model to be used for this entity."
               
                trail_effect(choices) : "Use Trail Effect" : 1 : "Use trail effect when the player is carrying the flag." =
                [
                                0 : "None"
                                1 : "All Effects"
                                2 : "Paper Trail Only"
                                3 : "Color Trail Only"
                ]
               
                // Inputs
                input ForceDrop(void) : "Force the flag to be dropped if it's being carried by a player."
                input ForceReset(void) : "Force the flag to be dropped if it's being carried by a player, then reset the flag to its original location."
                               
                // Outputs
                output OnReturn(void)  : "Sent when the flag is returned via timer."
                output OnPickup(void)  : "Sent when the flag is picked up."
                output OnPickupTeam1(void) : "Sent when the flag is picked up by RED."
                output OnPickupTeam2(void) : "Sent when the flag is picked up by BLU."
                output OnDrop(void)    : "Sent when the flag is dropped."
                output OnCapture(void) : "Sent when the flag is captured."
                output OnCapTeam1(void) : "Sent when the flag is captured by RED."
                output OnCapTeam2(void) : "Sent when the flag is captured by BLU."
]
 
Dec 25, 2007
566
439
input ForceDrop(void) : "Force the flag to be dropped if it's being carried by a player."
input ForceReset(void) : "Force the flag to be dropped if it's being carried by a player, then reset the flag to its original location."
Ooh, those look useful.

Does that mean we'll actually be able to use the invade mode on the flag without problems?
Yep.

Yeah, Eric's da man!
 

Boylee

pew pew pew
aa
Apr 29, 2008
1,068
709
Update's out:
Code:
...
Fixed the return progress bar above a dropped flag not animating if the return time on the flag is less than 30 seconds

Fixed the CTF HUD not properly handling flags being disabled/enabled during the round
...

[B]Community requests[/B]
Added new options for the Invade CTF game mode flag. Default is 1
0 : No neutral time
1 : Flag goes neutral in 30 seconds (current behavior)
2 : Flag goes neutral in 1/2 the return time

Added scoring choice for the Invade CTF game mode. Default is 0
0 : Increment score (current behavior)
1 : Increment capture count

Added new inputs to item_teamflag
ForceDrop : Force the flag to be dropped if it's being carried by a player
ForceReset : Force the flag to be dropped if it's being carried by a player, then reset the flag to its original location
SetReturnTime : Set the length of time (in seconds) before a dropped flag returns to base

Added new output to item_teamflag
OnTouchSameTeam : Sent when the flag is touched by a player on the same team

Thanks VALVe :3
 
Nov 14, 2009
1,257
378
Im curious: How do I activate the Invade mode in my map?
EDIT: By that, I mean make Invade compatible with the contest
 
Last edited:

Boylee

pew pew pew
aa
Apr 29, 2008
1,068
709
Im curious: How do I activate the Invade mode in my map?
EDIT: By that, I mean make Invade compatible with the contest

After the update it's as simple as selecting the invade mode from the gametype parameter on your item_teamflag, like so:
LkvCm.jpg


However you should add the bits to your fgd the VFIG posted here if you want to control the invade flag parameters properly (like set the time it takes the flag to return to neutral etc.)

Personally I'm not actually using this mode as I like having the intel set to return to neutral as soon as it's dropped, so I'm still using the CTF mode with the workaround that supersandvich posted.
 
Last edited:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
I'm glad they made the changes so quickly. I just wish there was a 3rd option allowing the flag to turn neutral straight away. I'm guessing that you can use OnDrop SetTeam 1 as a workaround within the Invade gamemode.
 

Colt Seavers

L6: Sharp Member
Dec 30, 2007
288
82
Good work valve 8) Agree with Psy though - for me, the immediate neutral option works very well indeed with TF2 - it keeps the pace lively and ensures the entire time on the map is intense. Strange they didn't include as easy option as it seems obvious.
 
Dec 25, 2007
566
439
Yeah, the same OnDrop I/O -> SetTeam, SetSkin will work to make the flag immediately neutral.

Now that the other Invade issues are fixed (well, I haven't tested yet to be sure :) ) I'll be experimenting with a very short second delay before the flag becomes neutral. That should still ensure a good pace, but gives a team a bit better chance to get the flag to the CP rather than having it immediately taken by the enemy.

I think I'll to make an Invade prefab vmf (with a few variations for drops, flag respawns) tonight.