**This is an old revision of the document!**
Placing Units
Reviewed For: SDK 2.1
The Unit class represents all buildings and vehicles in Outpost 2. All scenarios will require some initial units.
LOCATION offset
Unit positions are represented in game by either the structure LOCATION or by passing 2 integers into a function, representing the x and y position. LOCATION represents the tile currently being occupied by the unit. The Outpost 2 game engine requires units to be placed +31 X tiles and -1 Y tiles from their actual position. For example: LOCATION(21 + 31, 15 - 1) would be the position (21,15) on the map.
When attempting to place units on the map, you can reference the map coordinates by using the mapper and looking in the lower right corner.
Related Source Code
Stub
Sample Code
- Go Back to Programming a Scenario
- Go Back to Outpost 2 Mapmaking
- Go Back to Outpost 2 Main page
- Go Back to Wiki Home Page