Page 1 of 1

orderDroidBuild() -- direction param

Posted: 01 Dec 2012, 23:49
by aubergine
I notice that the final release of 3.1 will be getting an optional direction param on this function, but wasn't sure what values it can take?

It seems to default to 0, so I'm guessing values can be 0, 90, 180, and 270? If that is the case, would it be worth adding some constants like NORTH, EAST, SOUTH, WEST?

Re: orderDroidBuild() -- direction param

Posted: 02 Dec 2012, 00:46
by Per
It takes degrees. Some constants would probably be nice, true...

Re: orderDroidBuild() -- direction param

Posted: 02 Dec 2012, 02:12
by aubergine
Does the pathfinding handle objects that have custom alignments? Eg. a factory rotated 31º - would it cause more or less problems than a factory rotated 90º?

Re: orderDroidBuild() -- direction param

Posted: 02 Dec 2012, 14:50
by Per
None of the code will expect directions other than 0, 90, 180 or 270, so if you try that, I'm pretty sure really strange things will start to happen. And by that I do not mean nice things :)

Re: orderDroidBuild() -- direction param

Posted: 02 Dec 2012, 15:23
by Cyp
Think the building would get snapped to a 90° angle. Or if it's like that in the map already, think it would be treated as if it had been snapped to a 90° angle for all purposes except rendering.