Multiple Flag Problem Redux - filter solution?

DrHaphazard

L5: Dapper Member
Jan 6, 2008
249
12
Aight guys. I posted on this problem once before and we figured out a sort of solution, but I am hoping for a better one.

Problem: A player can carry an infinite number of his team's flags. Every time a new flag is picked up the old ones are deleted so that they cannot be capped/returned/dropped.

This problem makes it difficult to make a multi-flag level. We did come up with a solution, but it didnt allow for dropped flags (essentially flag start points were gaurded by spawnrooms that made you drop the flag.) However I would love to have a return timer if i could...

Beelzebub from fpsbanana recommended i use a combination of a "filter_activator_name" and a "trigger_multiple" brush parented to the flag that would disable the flag whenever a FlagCarrier (his name having been set by the "filter_activator_name" ran over it. I'll quote him directly:

Beelzebub said:
I think your idea is possible. I am at work right now so I can't do all the research to piece it together properly, but here is a summary...

Create a filter_activator_name and set the filter to "FlagCarrier".
The item_teamflag's OnPickup output should fire the AddOutput input on !activator (which shold be the player that picked up the flag) and set the player's name to "FlagCarrier". Also add an output on OnDrop & OnReturn to set the players name to "NonCarrier".
Each flag has a trigger_multiple parented to it so that the trigger moves with the flag.
The trigger_multiple should have its filter set to the "FlagCarrier" filter you setup.
The trigger_multiple's OnStartTouch output should call the Disable input on the associated flag.
The trigger_multiole's OnEndTouch output should acll the Enable input on the associated flag.

How it should work is if a player picks up a flag, their internal name is changed to "FlagCarrier" if they get too close to another flag, it will get disabled so they can't pick it up. When they drop/cap the flag they are carrying, their name is cleared so they can once again pick up flags.
Let me know if you you need more details.

So I have attempted to replicate this idea, but have been unsuccesful. I was wondering if one of yall smarter people could try and see if you could get it to work or not. I'll quote myself to show you where i stand...

DrHaphazard said:
Essentially it seems like your system works thusly:

- All flags have a trigger around them that is parented to move with the flag.
- filter_activator_name set up for RedCarrier and BlueCarrier
- A player picks up the flag and gets named RedCarrier or BlueCarrier
- The encasing trigger has a filter for RedCarrier or BlueCarrier.
- The trigger is enabled at map start, disabled when the flag is picked up, and enabled again when flag is dropped or capped.
- The trigger has a OnStartTouch/OnEndTouch output to enable/disable the flag

That's it in a nutshell correct? I think my problem arises on getting the trigger to recognize when a RedCarrier or BlueCarrier is touching it.
 
Last edited: