Custom CTF entity help

Discussion in 'Mapping Questions & Discussion' started by Bermuda Cake, Jan 7, 2010.

  1. Bermuda Cake

    Bermuda Cake L9: Fashionable Member

    Messages:
    679
    Positive Ratings:
    192
    Hi, I've only got one thing to fix before I can release my map, but when testing I realised a problem:

    The aim is for red to capture all 3 flags within a time limit, each flag adding time, but if they only get 1/2 at the moment, they still win as they have more caps than blue team. How would I go about doing this?

    TY to anyone who takes this up
     
  2. Undies

    Undies L1: Registered

    Messages:
    45
    Positive Ratings:
    9
    outputs to a logic_compare and then to a game_round_win ought to do it :)
     
    • Thanks Thanks x 1
  3. Pseudo

    Pseudo L6: Sharp Member

    Messages:
    319
    Positive Ratings:
    149
    I think you'd need a math_counter rather than a logic_compare. You may also want to set the item_teamflag's gametype to something other than "CTF", this will prevent captures from being counted the normal way. This is important because server operators can set the number of flag captures for a win to something other then three. Your setup sounds like a variation on A/D CTF, so you should look into that.
     
    • Thanks Thanks x 1
  4. Bermuda Cake

    Bermuda Cake L9: Fashionable Member

    Messages:
    679
    Positive Ratings:
    192
    Thanks for all your help, but I'm still stumped :blushing:
     
  5. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    So, all RED has to do is just cap one time, and they'll win regardless of what else happens for the remainder of the round? Seems to me like that's a little unfair to BLU.
     
  6. Bermuda Cake

    Bermuda Cake L9: Fashionable Member

    Messages:
    679
    Positive Ratings:
    192
    No, thats the problem! The aim was to have it so red have to cap all 3 to win, but this is what is happening at the moment.

    I might make it so blue get 2 captures when the round begins, anyone know how to do this?
     
  7. The Asylum

    aa The Asylum

    Messages:
    1,658
    Positive Ratings:
    439
    Do yo have a team_round_timer and a round_win? I'm away from my mapping computer so what I'm suggesting may not work but here goes.

    Your round_win entity, set it to BLU team. Now on your team round timer, create this output:

    name: OnFinished
    target: (your round_win)
    input: RoundWin

    This should hopefully tell the game that BLU has won when the timer hits zero.
     
  8. Undies

    Undies L1: Registered

    Messages:
    45
    Positive Ratings:
    9
    one better, add a second round_win and a logic_compare :p
    have the timer trigger the compare rather than the Blu roundwin, it compares the number of caps vs 3 and then triggers the appropriate roundwin after...

    From the start, entities needed:
    Three item_teamflag, named "Flags"
    Two round_win, named "RedWin" and "BluWin." Set teams appropriately
    A math_counter, named "CapCount." Set max legal value to 3
    A logic_compare, name "Compare." Set the compare value as 2
    A team_round_timer, named "Time"

    Time has the output:
    Code:
    OnFinished - Compare - Compare
    When the timer runs out it trigger the logic_compare to compare against 2

    Flags have the output:
    Code:
    OnCapture -  Time - AddTime - 60
    OnCapture - CapCount - Add - 1
    each cap adds time and adds one to the counter

    CapCount has the output:
    Code:
    OutValue - Compare - SetValue
    OnHitMax - RedWin - RoundWin
    each time this is triggered (by changing the counters value, in our case, when a flag is capped) it increases the number by which the logic_compare will compare vs 2, or if all three caps are made, red wins

    Compare has the output:
    Code:
    OnLessThan - BluWin - RoundWin
    OnEqualTo - RedWin - RoundWin
    OnGreaterThan - RedWin - RoundWin
    if 0 or 1 cap has been made, Blu Wins
    if 2 are made, Red Wins
    if 3 caps are made Red Wins (though this should be triggered by the counter, not the compare)

    hope t hat explains a bit better