• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Getting Integer - Number of Players

Status
Not open for further replies.
Level 8
Joined
Sep 23, 2007
Messages
357
Im trying to make a trigger that says, once every player (actual person that is playing the game) has made their character, to delete every unit and destructible in the character creation area. I tried making something that says add every user player to X player group, and when someone makes their character to remove that person from the group, and then when X player group has 0 players in it to delete every unit and destructible in that area, but its not working.
 
Level 8
Joined
Sep 23, 2007
Messages
357
  • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
    • Loop - Actions
      • Player Group - Add (Picked player) to PlayersInCharacterCreation
  • If - Conditions
    • (Number of players in PlayersInCharacterCreation) Equal to (==) 0
  • Then - Actions
    • Custom script: call RemoveLocation(udg_InterfaceSelectTempPoint)
    • Unit Group - Pick every unit in (Units in Character Creation Area <gen>) and do (Unit - Remove (Picked unit) from the game)
    • Destructible - Pick every destructible in Character Creation Area <gen> and do (Destructible - Remove (Picked destructible))
    • Trigger - Destroy (This trigger)
What Im trying to do though is make it pick every player thats actually in the game, not every slot that is able to have a player in it
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
  • Player Group - Pick every player in (All players controlled by a User player) and do (Actions)
    • Loop - Actions
      • Player Group - Add (Picked player) to PlayersInCharacterCreation
  • If - Conditions
    • (Number of players in PlayersInCharacterCreation) Equal to (==) 0
  • Then - Actions
    • Custom script: call RemoveLocation(udg_InterfaceSelectTempPoint)
    • Unit Group - Pick every unit in (Units in Character Creation Area <gen>) and do (Unit - Remove (Picked unit) from the game)
    • Destructible - Pick every destructible in Character Creation Area <gen> and do (Destructible - Remove (Picked destructible))
    • Trigger - Destroy (This trigger)
What Im trying to do though is make it pick every player thats actually in the game, not every slot that is able to have a player in it

First of all you leak 2 locations:
  • Unit Group - Pick every unit in (Units in Character Creation Area <gen>) and do (Unit - Remove (Picked unit) from the game)
    • Destructible - Pick every destructible in Character Creation Area <gen> and do (Destructible - Remove (Picked destructible))
Second of all, why not pick every player matching: matching player controll status equals to is playing and matching player slot status equal to player slot?
 
Last edited:
Level 8
Joined
Sep 23, 2007
Messages
357
First of all you leak 2 locations:
  • Unit Group - Pick every unit in (Units in Character Creation Area <gen>) and do (Unit - Remove (Picked unit) from the game)
    • Destructible - Pick every destructible in Character Creation Area <gen> and do (Destructible - Remove (Picked destructible))
Second of all, why not pick every player matching: matching player controll status equals to is playing and matching player slot status equal to player slot?

how do i fix those leaks?

Also, how do I put in two matching conditions?
nvm i just put an if/then/else inside of the pick all players loop. I originally thought that doing that would not work, because i have tried it in the past and it didnt work, but it seems to be working this time.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
how do i fix those leaks?

Also, how do I put in two matching conditions?
nvm i just put an if/then/else inside of the pick all players loop. I originally thought that doing that would not work, because i have tried it in the past and it didnt work, but it seems to be working this time.

Oops, sorry I'm mistaken about the location leaks, they are global regions instead. I should clear up my head from dillusional crap >.>

How do I put in 2 matching conditions? Have you ever scrolled to the bottom of the condition list? It should have a condition somewhere called: and
 
Status
Not open for further replies.
Top