Change unit facing?

Lutefisk Mafia

Inscrutable Enforcer
Joined
Jun 15, 2007
Messages
544
Location
Minnesota
Usually I am pretty good at deciphering other peoples' code, but this one is driving me nuts.

Anyone know how Afterworld gets units to just change the direction in which they face, but not move off of their plot?

I am looking for a python comand that will change the facing direction of a selected unit. Something like:

pUnit.setFacing(i int)?

Does it exist?

thanks!
 
Not directly apparently. Using CyUnit.getFacingDirection(), CyUnit.rotateFacingDirectionClockwise(), and CyUnit.rotateFacingDirectionCounterClockwise() you might be able to do what you want. So typical that setFacingDirection() is missing from the Python API; it's in CvUnit. :crazyeye:
 
Top Bottom