orderDroidBuild() -- direction param

For AI and campaign script related discussions and questions
Post Reply
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

orderDroidBuild() -- direction param

Post 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?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: orderDroidBuild() -- direction param

Post by Per »

It takes degrees. Some constants would probably be nice, true...
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: orderDroidBuild() -- direction param

Post 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º?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: orderDroidBuild() -- direction param

Post 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 :)
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

Re: orderDroidBuild() -- direction param

Post 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.
Post Reply