1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Multiboard Kill & Death Tally

Discussion in 'World Editor Help Zone' started by Scary Nachos, May 26, 2009.

  1. Scary Nachos

    Scary Nachos

    Joined:
    Dec 20, 2008
    Messages:
    16
    Resources:
    0
    Resources:
    0
    Hello! I was working on my multiboard, and well i couldnt figure out how to do the tallying on it. I looked at the two multiboard tutorials, and i tried to modify them, but it didnt work out...

    What i want my multiboard to track is...
    1. Total Unit Kills
    2. Total Unit Deaths
    3. Total Hero Kills
    4. Total Hero Deaths

    That is for team 1 and team 2

    For Indivuidual Players i need the same thing.

    If you dont understand what i mean.. heres an illistration

    ------------------------------Deaths and Kills

    *Team--*Total Unit Kills--*Total Hero Kills--*Total Unit Deaths--*Total Hero Deaths
    Team 1--0---------------0-----------------0-------------------0
    Team 2--0---------------0-----------------0-------------------0
    -Player Name -Unit Kills -Hero Kills -Unit Deaths -Hero Deaths
    Red------------0--------------0----------------0---------------0
    Blue------------0--------------0----------------0---------------0
    Teal------------0--------------0----------------0---------------0
    Purp------------0--------------0----------------0---------------0
    Yello------------0--------------0----------------0---------------0
    -------------------------------------------------------------------
    Oj---------------0--------------0----------------0---------------0
    Green------------0--------------0----------------0---------------0
    Pink--------------0--------------0----------------0---------------0
    Gray--------------0--------------0----------------0---------------0
    LightBlue----------0--------------0----------------0---------------0

    Yeah.. sorry for the bad illistration, just to get my point accrosed.

    So yeah i need help with triggering the deaths and kills.

    Here is something i tried, but it didnt work D=


    • UnitDeaths
    • Events
    • Unit - A unit Dies
    • Conditions
    • (Owner of (Killing unit)) Equal to Player 1 (Red)
    • Actions
    • Set Kill_Count[(Player number of (Owner of (Killing unit)))] = Kill_Count[((Player number of (Owner of (Killing unit))) + 1)]
    • Multiboard - Set the text for multiboard_flag item in column 2, row 5 to (String(Kill_Count[(Player number of (Owner of (Killing unit)))]))


    My board is working fine, so im not sure what the problem is.
    I just need help triggering the deaths and kills tally of my multiboard
    I am using regular WE, so GUI would be appreciated
    Thanks
    +Rep for help
     
  2. Hemske

    Hemske

    Joined:
    Mar 23, 2008
    Messages:
    1,568
    Resources:
    58
    Icons:
    56
    Packs:
    1
    Spells:
    1
    Resources:
    58
    Dont know if this help you, had hard to understand what you were needed help with :/ But i use this in my map to count hero kills, just change hero to unit and itll count for every unit a player kills:
    • KillsMultiboard
      • Events
        • Unit - A unit Dies
      • Conditions
        • ((Dying unit) is A Hero) Equal to True
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Killing unit)) Equal to Player 1 (Red)
          • Then - Actions
            • Set Player1Kills = (Player1Kills + 1)
            • Multiboard - Set the text for Multiboard item in column 2, row 1 to (String(Player1Kills))
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Killing unit)) Equal to Player 2 (Blue)
          • Then - Actions
            • Set Player2Kills = (Player2Kills + 1)
            • Multiboard - Set the text for Multiboard item in column 2, row 2 to (String(Player2Kills))
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Killing unit)) Equal to Player 3 (Teal)
          • Then - Actions
            • Set Player3Kills = (Player3Kills + 1)
            • Multiboard - Set the text for Multiboard item in column 2, row 3 to (String(Player3Kills))
          • Else - Actions
            • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Killing unit)) Equal to Player 4 (Purple)
          • Then - Actions
            • Set Player4Kills = (Player4Kills + 1)
            • Multiboard - Set the text for Multiboard item in column 2, row 4 to (String(Player4Kills))
          • Else - Actions
            • Do nothing
     
  3. Billy the Cat

    Billy the Cat

    Joined:
    Mar 13, 2009
    Messages:
    831
    Resources:
    0
    Resources:
    0
    It might be possible to use PlayerKills(Player Number) for an array and then use some maths for the row number to make it easier :p
    Set PlayerKills(Player Number of owner of killing unit) = PlayerKills(blah blah :p) + 1
    And then change it in for example:
    Column 2, Row [Playernumber of Owner of killing unit] + 3(or whatever fits your needs)
     
  4. Vegavak

    Vegavak

    Joined:
    Mar 16, 2006
    Messages:
    1,010
    Resources:
    0
    Resources:
    0
    Use integer variables to store the kills and deaths.

    Set total_deaths[Player(Number of(Owner of (Dying Unit))) = total_deaths[Player(Number of(Owner of (Dying Unit))) + 1

    Set total_kills[Player(Number of(Owner of (Killing Unit))) = total_kills[Player(Number of(Owner of (Killing Unit))) + 1

    And have your "update" trigger which is cycling every second to update these values.