Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
op2_sdk:placing_units [2016/01/31 21:04] – vagabond | op2_sdk:placing_units [2016/01/31 21:11] – vagabond | ||
---|---|---|---|
Line 10: | Line 10: | ||
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. | 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. | ||
- | |||
===== Building Origin ===== | ===== Building Origin ===== | ||
Line 24: | Line 23: | ||
When any vehicle is created, it defaults to lights off. The function void '' | When any vehicle is created, it defaults to lights off. The function void '' | ||
+ | |||
+ | ===== Using the CreateUnit Function ===== | ||
+ | |||
+ | Some variables used in '' | ||
+ | |||
+ | When placing buildings, the variable rotation does not have any meaning and can be set to any value. | ||
===== Related Source Code ===== | ===== Related Source Code ===== |