Change CTF game mode ?

Discussion in 'Request Area' started by CafeineMan, Mar 4, 2015.

  1. CafeineMan

    CafeineMan L2: Junior Member

    Messages:
    58
    Positive Ratings:
    9
    Hello,

    I am just finishing a little capture the flag map and would like to know if you think that possible to change the original capture the flag game mode like this :

    - limited time (30mn for exemple the game)
    - the team who capture most flags win
    - in case of equality => sudden death (no more limited time) : the first who capture a new flag win.

    PS: sorry for my bad english.
     
  2. Egan

    aa Egan

    Messages:
    1,318
    Positive Ratings:
    1,507
    It's possible to do the first part of that, but as far as I know stalemate/suddendeath option is controlled by a server variable, one that might not revert back to its normal state if you were to change its value in the map (it will revert if it's value is set up in the server.cfg).

    For the first part, you will need: 2 math_counter, 3 game_round_win, 1 team_round_timer, 1 logic_compare, and the base CTF gamemode entities:
    [​IMG]

    The idea is to track the scores of each team's captures with the math_counters, and then from the team_round_timer compare the two when the round ends.

    You can set this up like so:
    [​IMG]
    On the func_capturezone for team 1, Output of:
    • OnCapture - math_counter - Add - 1
    [​IMG]
    On the math_counter for team 1, Output of:
    • OutValue - logic_compare - SetValue - [blank parameter override]
    [​IMG]
    On the math_counter for team 2, Output of:
    • OutValue - logic_compare - SetCompareValue - [blank parameter override]
    [​IMG]
    On the team_round_timer, Output of:
    • OnFinished - logic_compare - Compare
    [​IMG]
    On the logic_compare, Outputs of:
    • OnEqualTo - win_stalemate - RoundWin
    • OnGreaterThan - win_red - RoundWin
    • OnLessThan - win_blue - RoundWin

    [​IMG]
    Keyvalues set up for the team_round_timer

    [​IMG]
    Keyvalues set up for the logic_compare

    [​IMG]
    Keyvalues set up for the game_round_win (this one for stalemate)

    To mention a bit more about the logic_compare, there are two values it stores: a value, and a 'compare' value. You can set the compare value to something different than the value, and then compare the two with the output of Compare. You can see all the available outputs of an entity by clicking on the Help button in the property window:
    [​IMG]

    Also the OutValue of a math_counter will mean that every time the value of the math_counter changes it will spit out the value to the target:
    [​IMG]
     
    • Thanks Thanks x 2
    Last edited: Mar 4, 2015
  3. CafeineMan

    CafeineMan L2: Junior Member

    Messages:
    58
    Positive Ratings:
    9
    Wow !! I did'nt expect such a complete response (and how fast) ! You're very kind !
    It seems a little bit complex, but i'll try this !
    Thanks !
     
  4. radarhead

    aa radarhead Hands out ratings like cheap cigars

    Messages:
    1,004
    Positive Ratings:
    543
    Egan, you're a cool guy.
     
    • Thanks Thanks x 1