HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

XMas Question: AttackMoveKillA function return

12-23-2003, 09:22 PM#1
Tommi
Merry Christmas to all JASS/AI folks!! :ggani:

Well, then to the question. I am experimenting with attack move actions, especially AttackMoveKillA(targetUnit). This function returns when the target is destroyed. However, it does so quite randomly, anywhere between 0 and 5 seconds after the target has been destroyed. I would want to assign a new target immediately when a previous one is destroyed. Any idea what's the problem and how to solve it?

Cheers,

Tommi
12-23-2003, 11:02 PM#2
AIAndy
When you look in common.ai you will find that AttackMoveKillA is not a native but a function. Since it is not event based but checks every x seconds if the target is still alive so it will not notice at the exact time. Also it does check if there is still a fight going on there before it returns.
So what you could do is reduce the sleeps in the functions called by AttackMoveKillA and remove that call that checks if there is still a fight going on.
12-24-2003, 09:39 AM#3
Tommi
Thanks, Andy.