Basic Rules:
- A typical CTF map is composed of two opposing sides, a red side and a blue side.
- A team is required to get into the enemy side, steal their flag and return it to the home base in order to score a point.
- The home base will not accept the opposing team's flag if the home flag is missing itself.
- Players can use weapons, but he who carries the flag is not allowed to use any weapons until he drops the flag.
- Once a flag is dropped, it remains on the ground for an arbitrary amount of time, and then automatically returns to its home base.
- A flag that is on the ground, when touched by a member of the same team, will return to its home base.
- A flag that is on the ground may be picked up by the opposing team.
- When one team has reached a predetermined amount of points, the game ends and the team with the most points wins.
- When a certain amount of game time has elapsed, the game ends and the team with the most points wins, or a tie in the case of equal points.
How this can be done in HL2 without modding:
- The zone where a flag is returned is a trigger_teleport.
The zone uses a filter_multi, which uses two other filters: One to test
for the presence of a team member, and one test for the presence of the
opposing team's flag. We could branch another AND in there,
testing for the absence of any opposing team member. When
conditions are met, a game_text is Displayed such as "Blue Team has
captured the flag!" and the score is incremented.
- Once the filter_multi is a PASS, the trigger will disable motion on the flag, break it, and call an Input to create a new flag in that team's home base.
- Once a team steals the flag, the trigger_teleport for the opposing team is disabled.
- The flag is a regular func_physbox with a mass scale of like .01
(easily carried). On Physgrab, a test for team is made, and if it
is the proper team, motion is enabled, and a game_text message is sent
out such as "Blue has stolen the flag". OnPhysDrop would disable
motion and send out a game_text message such as "Blue has dropped the
Flag" ... We could use a logic_ entity to keep track of whether
the flag has been taken or not, and that value affects the OnPhysgrab
and OnPhysDrop behaviors (So Blue can carry their flag back to their
base.)
How do we get the flag to automatically zip back to the flag post once its own team touches it? There is no output that I can use such as "MoveTo <name of target>" Unfortunately. We *COULD* put a twist on CTF and have flag return points throughout the level, so touching the flag is not enough, you have to return it to the nearest flag return. Maybe we can use the OnPhysgrab, combined with a successful check that the flag has been removed from the base to put in a server command to destroy the current flag, and create another in the base (someone else should comment on this as I have no experience with it) ...
Anyways - any ideas on how we can make this fly?
[addsig]


