.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   Hex <-> Coordinates conversion for scripts (http://forum.shrapnelgames.com/showthread.php?t=37215)

Suicide Junkie December 21st, 2007 06:15 PM

Hex <-> Coordinates conversion for scripts
 
1 Attachment(s)
If you want to convert hex IDs into system map coordinates, you'll need these functions http://forum.shrapnelgames.com/images/smilies/happy.gif

Useful for:
- Moving ships a certain number of hexes (In GGmod, ships ending turn on a warppoint are shoved 1 hex in a random direction so that chokepoints aren't.
- Swirling ships around as they go down into the black hole.
- If you wanted to, you could make planets orbit their stars, although it would tend to cause trouble with ship navigation http://forum.shrapnelgames.com/images/smilies/happy.gif
- Stargates. Players can dial an address using map coords, and you can now figure out what hex ID you need to use for the warppoint's destination.


All times are GMT -4. The time now is 06:33 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.