• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Highest Player number?

Status
Not open for further replies.
Level 16
Joined
Oct 12, 2008
Messages
1,569
A little question,

When player 1, 2, 3, 7, 8 and 9 are playing a game (it is not important at all what game)
How can i check the highest player number?
number of players wont work, since there are 6 players, but the highest is 9.

The best and quickest way of checking gets a big :thumbs_up: and + rep
xD Good luck!
 
dude, why arent you just using your brain? He just told you the answer, and you event dont think about it!

Count the damn players in the group, he really said all, and this is not a big problem, i guess you are just lazy?! Change the way, your asking your questions, man, this really makes me angry! -.-
 
dude, why arent you just using your brain? He just told you the answer, and you event dont think about it!

Count the damn players in the group, he really said all, and this is not a big problem, i guess you are just lazy?! Change the way, your asking your questions, man, this really makes me angry! -.-

WTF? NO!
If players 1, 2 and 6 are playing, the number of players in the group is 3!
But i need the 6 (is the number of the highest player!!)
If players 3,4,5 and 9 are playing, the number of players in the group us 4!
But i need the 9, cause that is the highest player number!

i dont need the AMOUNT of players, but the HIGHEST PLAYER NR.!! READ THE NAME OF THE FRIGGIN POST!
 
anybody said anything about an amount,

you just have to use an integer variable !

For each player in the group
If integer_variable < PLayer number of Picked Player then
set integer_variable = Player Number of Picked Player
 
Make loop

JASS:
local integer i=-1
loop
set i=i+1
If GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
set udg_HighestNumber=i
endif
exitwhen i==11
endloop


And Modify PlayerNumber every time player leave.
 
Make loop

JASS:
local integer i=-1
loop
set i=i+1
If GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING then
set udg_HighestNumber=i
endif
exitwhen i==11
endloop


And Modify PlayerNumber every time player leave.

Now this is what i am talking about
That would be in GUI something like this? :
  • For each (Integer A) from 1 to 12, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Player((Integer A))) slot status) Equal to Is playing
        • Then - Actions
          • Set Highest = (Integer A)
        • Else - Actions
 
Status
Not open for further replies.
Back
Top