Help with custom game mode

Discussion in 'Mapping Questions & Discussion' started by Vigilante212, Apr 29, 2009.

  1. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    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 :).
     
  2. Kronixx

    Kronixx L5: Dapper Member

    Messages:
    205
    Positive Ratings:
    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.
     
  3. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    33
    Yea similar to koth.
     
  4. Schmoe

    Schmoe L2: Junior Member

    Messages:
    60
    Positive Ratings:
    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).
     
    • Thanks Thanks x 1
  5. Schmoe

    Schmoe L2: Junior Member

    Messages:
    60
    Positive Ratings:
    1
    Also... make sure the map timer doesn't affect the game.
     
  6. Kronixx

    Kronixx L5: Dapper Member

    Messages:
    205
    Positive Ratings:
    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
     
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    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.
     
  8. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    33
    ill set it up see if it works thanks.
     
  9. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    33
    lol I was browsing valve wiki and came across this.

    http://developer.valvesoftware.com/wiki/TF2/Creating_a_Single_Flag_Keep-Away_map

    Boojum I tried with the logic_timer, but it isnt visable in the HUD and I couldnt figure out how to set it to disable the capture afterwords. although the diabling part was prob just me being dumb :) im going to try the team round timer, but without the force restart.
     
    Last edited: Apr 30, 2009
  10. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    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: Apr 30, 2009
  11. Zeewier

    Zeewier L9: Fashionable Member

    Messages:
    619
    Positive Ratings:
    130
    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.
     
  12. GrimGriz

    GrimGriz L10: Glamorous Member

    Messages:
    774
    Positive Ratings:
    133
    You could enable a map-encompassing capture zone at the end of the 5 minutes
     
  13. -gr-

    -gr- L1: Registered

    Messages:
    17
    Positive Ratings:
    12
    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.
     
    • Thanks Thanks x 2
  14. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    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.
     
  15. Schmoe

    Schmoe L2: Junior Member

    Messages:
    60
    Positive Ratings:
    1
    You rock.
     
  16. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    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?
     
  17. -gr-

    -gr- L1: Registered

    Messages:
    17
    Positive Ratings:
    12
    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.
     
    • Thanks Thanks x 1
  18. -gr-

    -gr- L1: Registered

    Messages:
    17
    Positive Ratings:
    12
    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.
     
    • Thanks Thanks x 1
  19. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    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.
     
  20. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    33
    ill post my setup later maybe that will give you an idea of how I have it all set.