Help with custom game mode

Vigilante212

L420: High Member
Dec 21, 2008
481
33
I want to setup a game mode where there is 1 intel, and for each 5 min(exp) the team holds the intel they get 1 point, after the 5 min the intel returns to the center. but if they drop the intel and the other team picks it up i dont want the 5 min timer to reset I just want it to pause, and only reset if the other team holds it for the 5 min. Call it Keep away KA

the most complicated system ive made to date has been a simple CTF so be kind :).
 

Kronixx

L5: Dapper Member
Apr 17, 2009
205
38
sounds fun, whether it's possible or not is beyond me...sorry

sounds like it could just be a modified KOTH system (king of the hill) which is being put in a number of maps i hear, Icarus just finished his KOTH_Waste. Perhaps he has some info? Otherwise, maybe the all powerful boojum has some knowledge to enlighten us with.
 

Schmoe

L2: Junior Member
May 18, 2008
60
1
I believe this is possible based on the following:

http://developer.valvesoftware.com/wiki/Item_teamflag

When the flag is picked up (item_teamflag's OnPickup output), you can Enable/Toggle a logic_timer (http://developer.valvesoftware.com/wiki/Logic_timer) that is set up to count down from 5 minutes. When it's finished (when the OnTimer output is fired) it will Enable a func_capturezone (http://developer.valvesoftware.com/wiki/Func_capturezone) that is sized to encapsulate the entire map.

Likewise when the flag is dropped (OnDrop), you can disable the timer. OnCapture can reset the timer.

Just be sure to design the map to allow dropped flags to be playable... Or set the return time to be ~60 seconds or folks will get annoyed.

Also test fringe cases when the timer is running out and a player drops the flag (the L key).
 

Kronixx

L5: Dapper Member
Apr 17, 2009
205
38
make sure you can't camp the flag either, i mean pick it up then make yourself impossible to reach by hiding in a spawn room or some other room blocked to the other team. If they attempt that either put a kill trigger or just force them to drop the flag on the spot so they can't turtle it
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
You can't forcibly remove the flag from a player without killing the entity and creating a new one. If you do this the player receives no notification that they lost the flag, and the HUD tells them they still have it.
 

Vigilante212

L420: High Member
Dec 21, 2008
481
33
Is it possible to have seperate timers for either team? both on the hud without a custom hud? im still trying to do it my way I dont want the way its setup in the link I posted.

Exp: Team Red picks it up first, but looses it 3 minutes in so thier timer pauses on 2 minutes. Then team Blu's timer starts at 5 minutes and they hold it for 4 minutes pausing thier timer at 1 minute. Then red holds it for the remaining 2 minutes and wins.

Other then that I have everything else working now.
 
Last edited:

Zeewier

L9: Fashionable Member
Sep 20, 2008
619
262
there is no way to have 2 timers on the hud.

I think I have a map that has this concept. It also has a particle effect that shows a trail of the carrier's movement.
 

GrimGriz

L10: Glamorous Member
Jan 2, 2009
774
133
You can't forcibly remove the flag from a player without killing the entity and creating a new one. If you do this the player receives no notification that they lost the flag, and the HUD tells them they still have it.

You could enable a map-encompassing capture zone at the end of the 5 minutes
 

-gr-

L1: Registered
Jul 11, 2008
17
12
You can't forcibly remove the flag from a player without killing the entity and creating a new one. If you do this the player receives no notification that they lost the flag, and the HUD tells them they still have it.

There is an Input that can be used to remove a CTF flag from a player. It is 'roundactivate'.

I've attached a .vmf and .bsp that demonstrates the behavior that I think Vigilante212 might find useful. The red and blue capture triggers function as expected, with scoring, etc. The white-diamondplate-textured capture trigger simply removes the flag, as you can see by trying the .bsp.

However, if you want to have a return timer you will need to, as A Boojum Snark indicates, kill and respawn the flag instead, after the roundactivate. There is a graphical glitch that stays behind at the removal point (the timer sprite) if you have a return timer of greater than zero. Not a big deal, but worth mentioning.
 

Vigilante212

L420: High Member
Dec 21, 2008
481
33
Thx for all the help. I decided to change the gameplay just a bit. The way I have it setup now is for every 30 seconds(may change) you carry the intel you get one point first team to 10 wins. if you drop the intel the timer resets to 30. after each point the intel returns to the start point. My map is small enough so this isnt a problem. Ill have it done today so hopefully itll be rdy to playtest friday.
 

Vigilante212

L420: High Member
Dec 21, 2008
481
33
Please dont hijack my thread.

Ok I played my game mode today and everyone seemed to like it alot. Now for the problems. shortly into the match the arrows all broke for the intel position. One said droped and the other was stuck at home. Is there any way to prevent this?
 

-gr-

L1: Registered
Jul 11, 2008
17
12
Is there a better way to detect if a flag is in a trigger_multiple using filters?

One way you could do it is to name the person who picks up the flag 'flag_carrier' and then use a filter_activator_name to have death pit trigger_hurts only harm/kill the player named flag_carrier. That is done by something like

OnPickup !activator AddOutput targetname flag_carrier

The elegant part of that type of system is the flag can be immediately returned on death of the player (if the timer is zero), and the custom player targetname attribute is cleared/reset on respawn.

I realize this doesn't answer your question directly, it's one possible method to emulate the behavior of what you're trying to do.
 

-gr-

L1: Registered
Jul 11, 2008
17
12
Ok I played my game mode today and everyone seemed to like it alot. Now for the problems. shortly into the match the arrows all broke for the intel position. One said droped and the other was stuck at home. Is there any way to prevent this?

Unfortunately, the answer is: It depends.

Flag behavior and HUD appearance can be extremely unpredictable if you don't take a few precautions. If the flag -home- position is dynamic/changing, you may have to add a second set of non-template'd flags into the map and disable (not kill!) them before you spawn the templates of the "real" flags to get consistent map startup behavior. The order is important. Likewise if the capture points are dynamic/changing, similar steps need to be taken.

A logic_auto with delays to enforce order of actions has proven invaluable, for me.

If the flag/HUD behavior and appearance is inconsistent AFTER the map has spawned and play has been ongoing for a few minutes, then the problem may just be in the flag specific events and how you're handling them.

In my maps, I have never seen the HUD update properly for a flag carrier unless the flag is removed by a player death, flag capture, flag drop, or roundactivate event. I've never used an extremely large capture area either, so there may be unforeseen buggy behavior in dynamically disabling and enabling that with players already in it.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
I found a previous post that used point_proximity_sensor parented to a flag for implementing flag-specific doors.

Is there a better way to detect if a flag is in a trigger_multiple using filters? I've done some experiments but have been unsuccessful. I have a few death pits in my map that I'd like the flag to immediately return to it's original position in the middle of the map (game mode is set to Invade). I've tried !activator roundactivate...

The proximity sensor would be unreliable and there are 4 different pits that I would need to take into account which are rather large.
http://forums.tf2maps.net/showthread.php?t=136 It uses the p_p_s, but if all your pits are (or can be) the same relative depth, and lower than the rest of the map, it works great.
 

Vigilante212

L420: High Member
Dec 21, 2008
481
33
Unfortunately, the answer is: It depends.

Flag behavior and HUD appearance can be extremely unpredictable if you don't take a few precautions. If the flag -home- position is dynamic/changing, you may have to add a second set of non-template'd flags into the map and disable (not kill!) them before you spawn the templates of the "real" flags to get consistent map startup behavior. The order is important. Likewise if the capture points are dynamic/changing, similar steps need to be taken.

A logic_auto with delays to enforce order of actions has proven invaluable, for me.

If the flag/HUD behavior and appearance is inconsistent AFTER the map has spawned and play has been ongoing for a few minutes, then the problem may just be in the flag specific events and how you're handling them.

In my maps, I have never seen the HUD update properly for a flag carrier unless the flag is removed by a player death, flag capture, flag drop, or roundactivate event. I've never used an extremely large capture area either, so there may be unforeseen buggy behavior in dynamically disabling and enabling that with players already in it.

ill post my setup later maybe that will give you an idea of how I have it all set.