op2_sdk:placing_units

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
op2_sdk:placing_units [2016/02/01 03:12] vagabondop2_sdk:placing_units [2016/10/12 21:32] (current) – external edit 127.0.0.1
Line 30: Line 30:
 When any vehicle is created, the Outpost 2 SDK defaults to turning its lights off. The function ''DoSetLights(int boolOn)'' from Unit.h can be used to turn the lights on. See example code below for context. When any vehicle is created, the Outpost 2 SDK defaults to turning its lights off. The function ''DoSetLights(int boolOn)'' from Unit.h can be used to turn the lights on. See example code below for context.
  
-===== Level 2 Headline =====+===== Placing Units In a Garage =====
  
 +During level initialization, units can be placed in a garage using the Unit function PutInGarage(int bayIndex, int tileX, int tileY). 
  
 +Call PutInGarage on the vehicle that you plan to place in a garage. The arguments tileX and tileY are the position of the garage you want the vehicle placed inside.
 +
 +You CAN add vehicles to a garage that are not owned by the same player as the garage owner.
 ===== Using the CreateUnit Function ===== ===== Using the CreateUnit Function =====
  
Line 79: Line 83:
 enum UnitDirection enum UnitDirection
 { {
- East = 0, +    East = 0, 
- SouthEast = 1, +    SouthEast = 1, 
- South = 2, +    South = 2, 
- SouthWest = 3, +    SouthWest = 3, 
- West = 4, +    West = 4, 
- NorthWest = 5, +    NorthWest = 5, 
- North = 6, +    North = 6, 
- NorthEast = 7,+    NorthEast = 7,
 }; };
 </code> </code>
Line 278: Line 282:
  - //Go Back to [[op2_sdk:software_development_kit_sdk|Outpost 2 Mapmaking]]//\\  - //Go Back to [[op2_sdk:software_development_kit_sdk|Outpost 2 Mapmaking]]//\\
  - //Go Back to [[outpost_2:outpost_2|Outpost 2 Main page]]//\\  - //Go Back to [[outpost_2:outpost_2|Outpost 2 Main page]]//\\
- - //Go Back to [[http://wiki.outpostuniverse.org/doku.php?id=start|Wiki Home Page]]//+ - //Go Back to [[http://wiki.outpost2.net/doku.php?id=start|Wiki Home Page]]//
  • op2_sdk/placing_units.1454296352.txt.gz
  • Last modified: 2016/02/01 03:12
  • by vagabond