ValvePython / dota2

🐸 Python package for interacting with Dota 2 Game Coordinator
http://dota2.readthedocs.io
205 stars 32 forks source link

Lobby start #68

Open Mrfull opened 3 years ago

Mrfull commented 3 years ago

How to launch game when all players connect to teams?

DEV-ONI commented 3 years ago

It is in the documentation: https://dota2.readthedocs.io/en/stable/dota2.features.lobby.html#dota2.features.lobby.Lobby.launch_practice_lobby

As for checking if all players have joined, you have to implement that yourself, perhaps by checking the all_members repeated proto field on the a lobby events:

https://github.com/ValvePython/dota2/blob/3ca4c43331d8bb946145ffbf92130f52e8eb024a/protobufs/dota_gcmessages_common_match_management.proto#L348

I suggest printing out or logging the proto messages you get so you can see what information they carry as you experiment with them.