April 10, 2021, 06:03:29 PM

Author Topic: Checking structure queue status, and Ordering a Unitgroup to "Attack-move"  (Read 479 times)

Kernel64

  • Sr. Member
  • ****
  • Posts: 207
    • View Profile
We can count alive or dead units, but is there a way so that the AI would count units that are in production , even in queue, or under construction owned by a human enemy player?

AITechCount works only for itself.
AIKnownUnitCount works for alive.

int DronesCount = TechTreeUnitCount(3-player, c_ZU_Drone, c_techCountQueuedOrBetter);

I know this works too. But I'm thinking region, point circle specific. Too complicated but I'm looking to grab certain structures and see if they're done. Like add-ons, etc. then go back a few seconds to see if they've been canceled, or does not exist anymore, or has been completed.

Edit:

Some traces of filters show filtering of buffs, ability effects (maybe same as buff), and checking of abilities. Maybe, just maybe, each structure's production queue is an ability. And if that ability is in use, we might be able to use this to check if a structure is working on something.

It may also be possible to create a group, and an order much like "follow" but this time, an "attack-move" order. This way, we can create a custom function that holds multiple groups of units, and order them to attack-move to certain location.
 
« Last Edit: March 17, 2010, 07:53:51 AM by Kernel64 »

Astazha

  • Member
  • ***
  • Posts: 78
    • View Profile
I'm beginning to lean towards doing things manually to get real control.  I'm just starting to look into it, but it seems like you could give a move order and then check in on that unit every script cycle to see if there are enemies in range.  If so, pick one and attack it.  If idle, begin moving again.

Kernel64

  • Sr. Member
  • ****
  • Posts: 207
    • View Profile
Couple of questions:

How do you manage waves and initiate attacks, diverts, drops?

What does a divert wave do?

Scouting with combat units?

The only way I can order an attack wave to attack atm is to loop a function with these:
            AIAddStringInt(player, c_ZU_Zergling, 4);
            AIWaveMerge(player, c_waveMain, c_waveAttack);
           AISetAttackState(player, e_attackState_Attack);

and the attack force is broken into groups of 2 lings spaced at mathematically precise distances.

It's funny watching the AI waste precious AMP on that parade, but hey, it's my fault.  :jig:

Have you got a function that you group certain units into a wave and send them to attack?

I mean, I have totally no idea how all of these works.

Astazha

  • Member
  • ***
  • Posts: 78
    • View Profile
I don't know yet myself.