Is there any way to check if the Command Node moves?

Started by Panlew, January 06, 2015, 11:59:59 PM

Previous topic - Next topic

Panlew


Grayzzur

Get the unit IDs for the command nodes, save their position, and watch their CONST_ISLANDED attribute. If they go from 1 (landed) to 0 (moving), they're on the move. You can then just assume that once it's landed, it has moved, or track the before and after X/Y coordinates and see if it changed if you need to be that picky. Useful commands to look up in the wiki:
GetAllUnitsInRange
GetUnitType (compare to "COMMANDNODE")
GetUnitAttribute (CONST_ISLANDED, CONST_COORDX, CONST_COORDY)
"Fate. It protects fools, little children, and ships named 'Enterprise.'" -William T. Riker