Help with CTF mod

Discussion in 'Mapping Questions & Discussion' started by SNES, Sep 4, 2009.

  1. SNES

    SNES L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Hello, first post and all.

    I'm incredibly new at map-making, but I have an idea for a variation of the standard CTF mode.

    1. Instead of depending on the number of captures, each round has its own timer
    2. When the losing team (the one with fewer captures) captures the flag, time is added
    3. The team with the most captures when time runs out is the winner of the round
    4. Overtime causes flag return timers to count down faster and lasts until both flags are back at their spawn points

    I have a very basic CTF map setup for testing (I got everything from A Boojum Snark's ultimate resource thing). But I'm unsure as to how to proceed. Can someone give me some tips? Or at least direct me to where I can find some?
     
  2. SNES

    SNES L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Okay, so here's what I've figured out so far. By myself.

    I've added a game_timer entity that seems to work.

    I've also figured out that I can use a logic_compare entity to evaluate whether two values are greater than or less than each other. In this case, the two values I need to compare are the number of captures each team has made.

    My current problem is figuring out how to make it so each of the values are properly reflected in the comparison. It'd be great if there was just a way to add one to every time a team scores, but all I see is setting specific values.

    Also, the game still ends when one team has made 3 captures, regardless of the time remaining. I need a way to prevent that.

    I'd still love any wisdom out there.
     
  3. Vigilante212

    Vigilante212 L7: Fancy Member

    Messages:
    481
    Positive Ratings:
    33
    try using a math counter
     
  4. PL-7764

    PL-7764 L6: Sharp Member

    Messages:
    376
    Positive Ratings:
    84
    From what I can recall based on my 2fort experiences, the last two points you wanted are already there by default. If one team has 2 captures and the other has 1, for instance, the team with 2 wins at the timer's end. Once Overtime starts the countdowns on any dropped intels run much faster until it's/they're back home (at which point you get a stalemate :p).

    I would expect that there would be a way to set an output to add to the timer on each flag capture, much as with capturing control points. No idea how to do it for only the losing team, but that might make it work so that both teams add time on cap. I don't know much about entities, so don't take my word for it on this one as I've never tried it and can't guarantee it's even doable.

    I believe that the # of captures required for a win is a server-side setting, and overriding it in a map is frowned upon. Setting the capture count for a win ridiculously high (like, say, 5,000) and ensuring your timer can never under any circumstances allow for enough time for that many to happen might create the effect you're looking for, since round wins already go to whoever captures the most in the time limit if neither gets the required number to win. You might run into problems here though if you also have the game add time with each capture, because then you really CAN end up with 5,000 captures... :p

    I'm no expert, but hopefully I've been of some help somewhere in all that ...
     
    • Thanks Thanks x 1
  5. SNES

    SNES L1: Registered

    Messages:
    3
    Positive Ratings:
    0
    Yeah, I think that'll work. Thanks!

    Thanks for the input! I had heard it was possible to redefine the cap limit. Such a feature would be kind of necessary for this mod, so I think I'll go with it. How do I do that?

    The basic logic I'm using is this: on every capture, the capture zone adds one score to the math counter for that team. The logic compare for that team resets its value to the new score and, if it's less than the value for the other team, time is added. Unfortunately, it doesn't seem to work. :(

    Also, while the map does go into overtime when the flag is being carried or on the ground, the timer counts down the same speed.