google-code-export / bwapi

Automatically exported from code.google.com/p/bwapi
0 stars 0 forks source link

supplyTotal() not updated at the same frame when A Overlord has been morphed #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
version2.5  

mylog below:

2173: A Zerg Overlord [2c70b08] has been morphed at (2036,3864)
2173: autobuild overload, supply all: 18, need 20...egg2overloadcnt 0, 
overloadcnt: 2

Original issue reported on code.google.com by chengxia...@gmail.com on 22 Dec 2009 at 6:16

GoogleCodeExporter commented 9 years ago
It seems that Zerg units are not ready the same frame they aren't Eggs anymore.
I've found that function isCompleted() should be called on Zerg unit to 
determine 
if it's already fully functional, e.g. can be ordered.

Original comment by tai...@nm.ru on 22 Dec 2009 at 8:13

GoogleCodeExporter commented 9 years ago
I mean that you should pay attention at the process of morhping any Zerg unit, 
for 
example Overlord.
First of all, larvae morphs into egg, then egg "evolves", then the egg breaks 
and 
unit starts to unwind. Unwinding takes some time, and onUnitMorph is called 
when 
unwinding just begun, though the unit would be counted by game as "ready" some 
frames later.

Original comment by tai...@nm.ru on 22 Dec 2009 at 11:30

GoogleCodeExporter commented 9 years ago
supplyTotal returns whatever it reads from Broodwar memory. Returning any other 
value
would be inaccurate. Taimen is right - many units have a bit of a delay between 
when
they finish being constructed or morphed, and when they are fully functional.

Original comment by lowerlo...@gmail.com on 23 Dec 2009 at 3:44

GoogleCodeExporter commented 9 years ago
thanks Taimen&lowerlogic, 

u are right, I tested drone&overload, when they morphed,their order turn to 
"ZergBirth" which last 15 frame, then turn to PlayerGuard or Pickup1

when in ZergBirth Order, issue order (like rightClick) will take no effect...
it seems blizzard use this order(state) only for graphic reality... 

Original comment by chengxia...@gmail.com on 23 Dec 2009 at 2:50