You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function. It only returns None, and never a location.
Creep tumors are the only 1x1 size buildings, the next bigger sized unit (that requires creep also) is the spine / spore crawler with 2x2. So far I've been using
instead, but that does not work well for ramps, edges or maps with (walkable) water (map example: Odyssey has lots of water), where normal buildings cannot be placed but creep tumors can.
Another issue is trying to access the
locationAttempts=30ability=self._game_data.abilities[BUILD_CREEPTUMOR_QUEEN.value]
# or the following:ability=self._game_data.units[CREEPTUMORQUEEN.value].creation_ability# in a circular motion around the location, figure out which is a valid location:positions= [Point2((location.x+spreadDistance*math.cos(math.pi*alpha*2/locationAttempts), location.y+spreadDistance*math.sin(math.pi*alpha*2/locationAttempts))) foralphainrange(locationAttempts)]
validPlacements=awaitself._client.query_building_placement(ability, positions)
self._client.query_building_placemen() function from the client.py file. The issue might be related as all the results report <ActionResult.NotSupported>.
This function is very useful when trying to check many locations in one await sweep.
The text was updated successfully, but these errors were encountered:
# positions = list of various Point2 or Point3 objects# check if any of the positions are validvalidPlacements=awaitself._client.query_building_placement(ability, positions)
# filter valid resultsvalidPlacements= [pforindex, pinenumerate(positions) ifvalidPlacements[index] ==ActionResult.Success]
# now "validPlacements" will contain a list of points where it is possible to place creep tumors# of course creep tumors have a limited range to place creep tumors but queens can move anywhereifvalidPlacementsandself.units(QUEEN).idle.exists:
queen=self.units(QUEEN).idle.randomforlocationinvalidPlacements:
err=awaitself.do(queen(BUILD_CREEPTUMOR_QUEEN, location))
# or the tumor alternative:# err = await self.do(tumor(BUILD_CREEPTUMOR_TUMOR, location))ifnoterr:
break
Now it works on ramps and in other (usually unbuildable) places.
I've been trying to make my bot spread creep across the map, however I've run into an issue with the
function. It only returns None, and never a location.
Creep tumors are the only 1x1 size buildings, the next bigger sized unit (that requires creep also) is the spine / spore crawler with 2x2. So far I've been using
instead, but that does not work well for ramps, edges or maps with (walkable) water (map example: Odyssey has lots of water), where normal buildings cannot be placed but creep tumors can.
Another issue is trying to access the
self._client.query_building_placemen() function from the client.py file. The issue might be related as all the results report <ActionResult.NotSupported>.
This function is very useful when trying to check many locations in one
await
sweep.The text was updated successfully, but these errors were encountered: