wc3 stats win/loss tracking - help implementing

Status
Not open for further replies.
Level 21
Joined
Mar 16, 2008
Messages
954
is there a way to get player in a group? that's how i have current victory triggers set up is by player group. Also, I can't figure out what type of variable MMD_FLAG_LOSER is. Any help or guidance would be appreciated. Is there such a jass command to say "GetPlayersInGroup" ?

  • call MMD_FlagPlayer (GetTriggerPlayer (), MMD_FLAG_LOSER)

Question: how do i edit the above jass code to flag players in a player group? i.e.:
  • Player Group - Pick every player in Losing_Group_Var and do (Game - Defeat (Picked player) with the message: ...)

Resource I am referring to


EDIT: I think this might work???
  • Player Group - Pick every player in Losing_Group_Var and do (Custom script: call MMD_FlagPlayer (GetTriggerPlayer (), MMD_FLAG_LOSER))
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,860
Understand that everything that exists in GUI (the standard Trigger Editor) also exists in Jass.

GUI stands for Graphical User Interface.
A GUI uses windows, icons, and menus to carry out commands, such as opening, deleting, and moving files.

In the case of the World Editor, GUI is used to program your map in Jass without actually needing to know how to write Jass. It's programming made easy and understandable. That being said, GUI has it's downsides and can be limiting. There's a good chunk of things you can ONLY do in Jass/Lua. Also, GUI tends to be less performant since it's an extra step in the whole process.

So anything you can do in GUI you can also do in Jass because they're basically the same thing. That's why you're able to convert your GUI triggers to Custom Text (aka Jass). Note that this option can be found under the Edit tab while you have a trigger selected. Converting GUI triggers to Custom Text is extremely useful if you're confused about things like what Picked player is called in Jass.

Anyway, to answer your question, Picked player = GetEnumPlayer()
  • Actions
    • Player Group - Pick every player in (All players) and do (Actions)
      • Loop - Actions
        • Custom script: call MMD_FlagPlayer (GetEnumPlayer(), MMD_FLAG_LOSER)
 
Last edited:
Level 21
Joined
Mar 16, 2008
Messages
954
That makes sense. So triggers are GUI for JASS. Thank you, Uncle! I see you changed 'triggering player' to 'enum player' interesting. I'll implement this right now with enum player.

Really above and beyond. Spoon feeding me and further inflating my sense of entitlement.
 
Status
Not open for further replies.
Top