- Oct 25, 2007
- 115
- 26
I see a few 1 flag CTF Maps in the works and thought I'd share a trick to make the flag indicators work (allowing for much better gameplay on these maps).
The setup:
You'll first need the two team filters (RedFilter for things that red team can trigger and BlueFilter for things that the blue team can trigger).
Now place your flag down with a team of any, give it a name (Flag). Set the following outputs up for Flag1:
MyOutput - Target - Via This Input - Parameter
OnCapture - Flag - SetTeam - 0
OnDrop - Flag - SetTeam - 0
OnReturn - Flag - SetTeam - 0
In the same spot on the X and Y plane but below your map create 2 more flags both called TmpFlag with one set to blue team and one set to red team.
Now create a trigger brush that contains your flag (so the flag is inside the trigger brush), The brush should be about the same size as the flag but slightly bigger (1-2 units larger than the flag itself on either side). Make this brush a trigger multiple. Do the same for 2 more brushes.
You should now have 3 Trigger multiple brushes. They need to be setup in the following way:
ALL:
Parent = Flag
Delay before Reset = 0
Trigger 1 "NuetralFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: None
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouching - TmpFlag - kill
OnEndTouchingAll - Flag - SetTeam - 0
Trigger 2 "RedFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: RedFilter
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouchingAll - Flag - SetTeam - 3
Trigger 2 "BlueFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: BlueFilter
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouchingAll - Flag - SetTeam - 2
How this works out:
What ends up happening is at the start of the game you will have 2 indicators pointing to the temp flags. They'll in effect look like they're pointing to the neutral flag though. When you
run over the flag to pick it up these TmpFlags are killed preventing the indicators from pointing to them anymore. Now since you quickly set the team of the flag before its picked up when it is picked up the indicator for that team will 'initialize' to that flag and forever more be properly pointing to that flag wherever it is. When the flag it dropped, captured, returned, etc. the flag will return to the neutral team so anyone can pick it up. You now have working indicators for your neutral flag map.
Issues:
A few issues with the system:
-Once a team touches the flag the dual indicators will disable and an indicator will only display on the side for the team holding the flag (which all players in game can still see). Once the other team touches and 'initializes' the flag as their own by picking it up the dual homing locations will be activated. Functionally there's no issue here as you can always tell where the flag is regardless of if both teams have touched it.
-The Home/Dropped icons for the flag isn't always accurate especially if a side hasn't 'initialized' their homing circle yet.
If there's any bugs in my system or setup let me know. I'm fairly sure the setup and the included map will work but I didn't get to test it with multiple people as it is currently setup (but it's just ripped from my jinxed map with stripped out game_text entities som I'm almost positive it will work).
The setup:
You'll first need the two team filters (RedFilter for things that red team can trigger and BlueFilter for things that the blue team can trigger).
Now place your flag down with a team of any, give it a name (Flag). Set the following outputs up for Flag1:
MyOutput - Target - Via This Input - Parameter
OnCapture - Flag - SetTeam - 0
OnDrop - Flag - SetTeam - 0
OnReturn - Flag - SetTeam - 0
In the same spot on the X and Y plane but below your map create 2 more flags both called TmpFlag with one set to blue team and one set to red team.
Now create a trigger brush that contains your flag (so the flag is inside the trigger brush), The brush should be about the same size as the flag but slightly bigger (1-2 units larger than the flag itself on either side). Make this brush a trigger multiple. Do the same for 2 more brushes.
You should now have 3 Trigger multiple brushes. They need to be setup in the following way:
ALL:
Parent = Flag
Delay before Reset = 0
Trigger 1 "NuetralFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: None
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouching - TmpFlag - kill
OnEndTouchingAll - Flag - SetTeam - 0
Trigger 2 "RedFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: RedFilter
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouchingAll - Flag - SetTeam - 3
Trigger 2 "BlueFlagControl" (you don't actually need to name the trigger_multiple but it's easier to explain it like this):
Filtername: BlueFilter
Output:
MyOutput - Target - Via This Input - Parameter
OnStartTouchingAll - Flag - SetTeam - 2
How this works out:
What ends up happening is at the start of the game you will have 2 indicators pointing to the temp flags. They'll in effect look like they're pointing to the neutral flag though. When you
run over the flag to pick it up these TmpFlags are killed preventing the indicators from pointing to them anymore. Now since you quickly set the team of the flag before its picked up when it is picked up the indicator for that team will 'initialize' to that flag and forever more be properly pointing to that flag wherever it is. When the flag it dropped, captured, returned, etc. the flag will return to the neutral team so anyone can pick it up. You now have working indicators for your neutral flag map.
Issues:
A few issues with the system:
-Once a team touches the flag the dual indicators will disable and an indicator will only display on the side for the team holding the flag (which all players in game can still see). Once the other team touches and 'initializes' the flag as their own by picking it up the dual homing locations will be activated. Functionally there's no issue here as you can always tell where the flag is regardless of if both teams have touched it.
-The Home/Dropped icons for the flag isn't always accurate especially if a side hasn't 'initialized' their homing circle yet.
If there's any bugs in my system or setup let me know. I'm fairly sure the setup and the included map will work but I didn't get to test it with multiple people as it is currently setup (but it's just ripped from my jinxed map with stripped out game_text entities som I'm almost positive it will work).