• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Simple Multiboard.

Status
Not open for further replies.
Level 15
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.
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
No not really.
This one only has the initialization.
 

Attachments

  • Multiboard.w3x
    17.3 KB · Views: 60

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
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