Hi All!
After spending about 6 hours last night coverting my AI from version 0.1 to 0.2, I have come across a slight problem.
What I'm trying to do is select every roach a player has, iterate through them all, and, if their health is below 40%, burrow, and stay burrowed, while health < 90%
Now, it works rather well, up to a point.
When the roaches health is below 40% it burrows like it's meant to, and just pops straight back up - It subsequently "leapfrogs" up and down while it's health is below 90%, causing it to be obliterated in the heat of battle.
Does anyone know how to make a burrowed unit, stay burrowed?
a simple (Pseudocode)
causes problems.
I think sending the burrow "spell" unburrows the burrowed unit...
Does anyone have a solution to this?
After spending about 6 hours last night coverting my AI from version 0.1 to 0.2, I have come across a slight problem.
What I'm trying to do is select every roach a player has, iterate through them all, and, if their health is below 40%, burrow, and stay burrowed, while health < 90%
Now, it works rather well, up to a point.
When the roaches health is below 40% it burrows like it's meant to, and just pops straight back up - It subsequently "leapfrogs" up and down while it's health is below 90%, causing it to be obliterated in the heat of battle.
Does anyone know how to make a burrowed unit, stay burrowed?
a simple (Pseudocode)
Code Select
while (healthPercect < 90)
{
AICast(burrow, roach);
}
causes problems.
I think sending the burrow "spell" unburrows the burrowed unit...
Does anyone have a solution to this?