pysc2 icon indicating copy to clipboard operation
pysc2 copied to clipboard

searching detailled doc like how to make one unit attack

Open loicmidy opened this issue 4 years ago • 1 comments

Hello, I'm starting to work on building an starcraft2 IA using pysc2. I followed the tutorial https://itnext.io/build-a-zerg-bot-with-pysc2-2-0-295375d2f58e. It's clear but it doesn't answer some important questions.

Is there detailled information somewhere available? What I want to do is to separate my army in several parts and send them to different locations. Idem for the drones.

The provided code in the tutorial select the whole army

return actions.FUNCTIONS.Attack_minimap("now",self.attack_coordinates) if self.can_do(obs, actions.FUNCTIONS.select_army.id): return actions.FUNCTIONS.select_army("select")

Yours sincerely Loïc Midy

loicmidy avatar Mar 02 '20 18:03 loicmidy

You could always select units in a rectangle using select_rect or just select each unit individually. I've never used the select_rect function before so I can't tell you how to use, but it should be the answer you're looking for.

As for a detailed document, the only thing I can tell you is to look into the actual pysc2 code (specifically actions.py) and try to search for the answers that way.

KingKeet avatar Jun 15 '20 16:06 KingKeet