• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Multiboard Woes {adding to a pool of kills when a team kills an enemy hero}

Status
Not open for further replies.
Level 5
Joined
Nov 1, 2007
Messages
71
I'm having some trouble with my Multiboard. Yes, I've read over the tutorials, but its not exactly what I'm looking for.

I've set up my multiboard so that it doesn't show player names, just the names of the Teams that the players are on. My question is, how exactly would I go about making it so that when Heroes from TeamA kill an enemy hero, their kills gets added to an overall pool of kills?

Any help would be appreciated. Its been awhile since I've looked at triggers, and I'm sure theres an easy solution, it's just not coming quickly to me :eek:
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Event: Unit dies

Condition:

Dying Unit is Enemy of Owner of Killing Unit
Dying Unit is a Hero
Killing Unit is a Hero

Action:

If Dying Unit is in "Your Groupvariable for Team A" then

set "YourVariableForTeamA" = "YourVariableForTeamA" + 1

else

set "YourVariableForTeamB" = "YourVariableForTeamB" + 1

endif

Dont see the problem oO
 
Level 5
Joined
Nov 1, 2007
Messages
71
Thanks for the help..

heh.. but uh.. what if I have 4 teams.. and I know you're facepalming already, but.. uh.. when I go to the Player group variable.. its not really.. y'know.. letting me pick multiple players. It's just kinda like.. Player Group - Player 1 (Red) So on and so forth.

Yes, I'm a newb.. but.. I really appreciate the help. We gotta start out somewhere... :sad:

EDIT:
Heres how my current setup is for my board
Teamname Kills
Team1 0
Team2 0
Team3 0
Team4 0

Heres my trigger so far, which is probably horribly wrong from start to finish..

[Red, Blue, and Teal are Team 1]

  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • ((Dying unit) is A Hero) Equal to True
    • Or - Any (Conditions) are true
      • Conditions
        • ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
        • ((Killing unit) belongs to an ally of Player 2 (Blue)) Equal to True
        • ((Killing unit) belongs to an ally of Player 3 (Teal)) Equal to True
  • Actions
    • Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
My question is, what do I do after Set kills, to change the numbers in column 2? And if I'm doing anything wrong [which I sure I am], what is it? Help is greatly appreciated!
 
Last edited by a moderator:
Level 14
Joined
Jul 1, 2008
Messages
1,314
Oh nice, so you got an array.

IF you got 4 players, everyone in his own team, you can delete this:
  • Or - Any (Conditions) are true
  • Conditions
  • ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
  • ((Killing unit) belongs to an ally of Player 2 (Blue)) Equal to True
  • ((Killing unit) belongs to an ally of Player 3 (Teal)) Equal to True
and just use the trigger as it is. Just insert a (Killing Unit) is a Hero Equal to true to your conditions, if you want only heroes to trigger this action.

BUT IF you have more than 4 players, and you want to check, if the players are ally of either red, blue or teal, then you have to splitt the conditions to find out, if the players are allies of the unit, that they killed. (Also delete them at Conditions and insert IF THEN ELSE "Actions" to the Actions)

Like this:
Actions
If Killing Unit belongs to an ally of Player 1 Equal to true then

Set Kills[1] = Kills[1] + 1

else
if Killing Unit belongs to an ally of Player 2 Equal to true then
Set Kills[2] = Kills[2] + 1

usw.
 
Status
Not open for further replies.
Top