• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Multiboard update issues

Status
Not open for further replies.
Level 7
Joined
Feb 23, 2020
Messages
253
Hello, how do i make this trigger work for only the hero/player itself. I have plenty of dummies and summoned units that i use in my map, which will make this count as a kill/death.

  • Kill Update
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set VariableSet Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 2, row Multiboard_Spots[(Player number of (Owner of (Killing unit)))] to (|cff00FF00 + ((String(Kills[(Player number of (Owner of (Killing unit)))])) + |r))
  • Death Update
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set VariableSet Deaths[(Player number of (Owner of (Dying unit)))] = (Deaths[(Player number of (Owner of (Dying unit)))] + 1)
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row Multiboard_Spots[(Player number of (Owner of (Dying unit)))] to (|cffFF0000 + ((String(Deaths[(Player number of (Owner of (Dying unit)))])) + |r))
I have tried a lot of conditions, such as "(Unit-type of (Killing unit)) Not equal to Footman,
(Owner of (Killing unit)) Not equal to Player 12 (Brown)"

Note: It also does not recognize which player gets the kill.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
You only need 1 trigger.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • -------- Increase Kills for owner of killing unit / Increase Deaths for owning of dying unit --------
Also, you may want to use a Variable to keep track of your Multiboard rather than using "Last created multiboard".
 
Level 7
Joined
Feb 23, 2020
Messages
253
You only need 1 trigger.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • -------- Increase Kills for owner of killing unit / Increase Deaths for owning of dying unit --------
Also, you may want to use a Variable to keep track of your Multiboard rather than using "Last created multiboard".
Yes i seemed to figure that one out with the deaths, but the kill update is more difficult and it's very buggy. Sometimes it will count for another player and this is for a Castle Defense, so i want the kills table to be able to count the amount of kills the player has done on creeps. (Some heroes have summoned units and i want that to count aswell).

I probably should yes, thank you for pointing that out :)

Edit: I think i managed to figure it out, will have to test with more people
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
  • Example
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- Deaths --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • -------- Increase Deaths for owner of dying unit --------
        • Else - Actions
      • -------- --------
      • -------- Kills --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • -------- Increase Kills for owner of killing unit --------
        • Else - Actions
In the If - Conditions add filters to exclude things that shouldn't increase deaths/kills.

In this example, only Hero deaths increase the death counter. And only non-summoned, non-structure kills that belong to an enemy will increase the kill counter.
  • Example 2
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- Deaths --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • -------- Increase Deaths for owner of dying unit --------
        • Else - Actions
      • -------- --------
      • -------- Kills --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is Summoned) Equal to False
          • ((Dying unit) is A structure) Equal to False
          • ((Dying unit) belongs to an enemy of (Owner of (Killing unit)).) Equal to True
        • Then - Actions
          • -------- Increase Kills for owner of killing unit --------
        • Else - Actions
 
Status
Not open for further replies.
Top