• 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.

Simple Multiboard.

Status
Not open for further replies.
Level 16
Joined
Mar 25, 2016
Messages
1,327
You use global variables (arrays) to store all the information (kills, deaths, ...).

The multiboard only displays these values.
At the beginning of the map you initialize the multiboard (how many rows, columns, icons, ...). Note that you cannot do this on map initialization as far as I know.
Whenever you change a variable connected to the multiboard, you should update the respecitve cell(s) in the multiboard.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
It is recommended to manipulate multiboards with JASS directly. The GUI actions for multiboards are extremely inefficient, especially for multiboards with a lot of rows and columns.

The concept is pretty simple. At elapsed time 0 (not map initialization and you cannot do multiboards then) you create a multiboard and configure the formatting as well as placing any player names and column names. In another trigger with periodic event every second you then update parts such as timers, dps counters, etc. A third trigger which is fired on events such as kills then updates the kill/dead counters.
 
As said by Dr. Super Good:

It is recommended to manipulate multiboards with JASS directly. The GUI actions for multiboards are extremely inefficient, especially for multiboards with a lot of rows and columns.

The concept is pretty simple. At elapsed time 0 (not map initialization and you cannot do multiboards then) you create a multiboard and configure the formatting as well as placing any player names and column names. In another trigger with periodic event every second you then update parts such as timers, dps counters, etc. A third trigger which is fired on events such as kills then updates the kill/dead counters.

You could first work with the GUI functions given, and once you've understood how they operate, you can then delve into jass.

The assist system could be quite troublesome to code, so I'm going to add a list of things needed for it:

(Thing is, I haven't coded something like this yet, so it may not be too optimized)


Basic:

Force array variable for all the players...
A generic damage detection trigger (you can look for Damage Detection Systems)

Task:

1.) I would assume that the force array variable is already initialized. If not, initialize them from 1 to the number of players you have.
2.) Using the damage detecting trigger, check if the damaged unit is an enemy and add the player of the damage-dealing unit to the force variables of all allied players, except for the player's own force variable.
3.) When a unit dies, get the owner of the killing unit, get its' force variable, and you have the players who have assisted you in this endeavor. Clear the force variable afterwards.

Drawbacks:

1.) If you dealt damage to an enemy unit, bringing it to the brink of death and your ally kills him/her, you would be labelled among those who assisted in the killing.

2.) It's a nasty case of permutation.

3.) If you harmed an enemy unit, then your ally harmed the enemy unit, and you kill another enemy unit, then the system would not know that your ally harmed the first enemy unit and when you kill it, no assist would turn up unless your ally will harm the enemy unit again.

 
Status
Not open for further replies.
Top