for my map i need to know how many players actually play.
The map supports max. 4 players. The difficulty is dynamically related to the number of players.
I tried the following trigger:
For every player in (All Players)
If (Controller of (Selected Player)) == User
If (Status of (Selected Player)) == Playing
Then
_playersIngame +1
But the game always sets the variable to 4. Why is this so?
What else condition could i set?
Next question. I got a ranklist. In the second line, there should be a progress bar which shows how much life
the base-building has.
Every second I update the ranklist with: Set Progressvalue for killTable in column 2 and row 2 to ((Unitname of HumanBase [...] HP (Percent))
But ingame the progress bar never changes :-(
Also the 4th row won´t be displayed. I´ll set it like every other text:
Set Text in killTable col 2 and row 4 as "Kills"
Set Text int kilLTable col 3 and row 4 as "Budget"
But ingame there are just empty fields, no text :-/
EDIT: Another little question. How can i get the player who killed a unit (using the Any unit died - event)?
Hello,
for my map i need to know how many players actually play. The map supports max. 4 players. The difficulty is dynamically related to the number of players.
I tried the following trigger:
For every player in (All Players) If (Controller of (Selected Player)) == User If (Status of (Selected Player)) == Playing Then _playersIngame +1
But the game always sets the variable to 4. Why is this so? What else condition could i set?
Next question. I got a ranklist. In the second line, there should be a progress bar which shows how much life the base-building has. Every second I update the ranklist with: Set Progressvalue for killTable in column 2 and row 2 to ((Unitname of HumanBase [...] HP (Percent))
But ingame the progress bar never changes :-(
Also the 4th row won´t be displayed. I´ll set it like every other text: Set Text in killTable col 2 and row 4 as "Kills" Set Text int kilLTable col 3 and row 4 as "Budget"
But ingame there are just empty fields, no text :-/
EDIT: Another little question. How can i get the player who killed a unit (using the Any unit died - event)?
Thank you :) TBR
Edit question answer: Owner of (Killing Unit).
First question: Number of players in (Active Players).
As for the others, don't know :D That is kind of strange, use debugger to look into the variables, see if they're set to appropriate values :)
@TheBlackRazer: Go
use <sub><sub> ProgressBar.Current Value.... This is the value the progress bar will display</sub></sub>
Thanks for the fast answers :) But doesn´t work at all...
1st: Number of Players (Active Players) returns 3, instead of 1. I made a workaround which works:
2nd: Progressabr.CurrentValue looks like galaxy script.. Which is the equivalent command block for it? Isn´t it:
3rd: Does anybody know why the fourth row in the ranklist is empty? :-/
Thanks :)
@TheBlackRazer: Go
if you go into the gui listing under the Dialog actions
and search for value.... you will see .... set dialog item current value
you also have to set the min and max values of the progress bar