op2_sdk:dayandnight

Differences

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

Link to this comparison view

Next revision
Previous revision
op2_sdk:dayandnight [2016/01/24 19:47] – created vagabondop2_sdk:dayandnight [2016/10/12 21:32] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Day and Night Cycles ====== ====== Day and Night Cycles ======
 +
 +''Reviewed For: SDK 2.1''
  
 Scenario Day and Night Cycles can be manipulated through the SDK. Day and Night settings should be set in the InitProc() function and have three different basic settings. Scenario Day and Night Cycles can be manipulated through the SDK. Day and Night settings should be set in the InitProc() function and have three different basic settings.
Line 11: Line 13:
 If you wish to indicate little time is passing during the scenario, consider setting to Day only or prevent Day/Night from cycling over time. If you wish to indicate little time is passing during the scenario, consider setting to Day only or prevent Day/Night from cycling over time.
  
-**Useful Functions**+===== Useful Functions ===== 
 + 
 +TethysGame
 <code cpp> <code cpp>
-From TethysGame 
 static void __fastcall SetDaylightEverywhere(int bOn); static void __fastcall SetDaylightEverywhere(int bOn);
 static void __fastcall SetDaylightMoves(int bOn); static void __fastcall SetDaylightMoves(int bOn);
 +</code>
  
-From GameMap+GameMap 
 +<code cpp>
 static void __fastcall SetInitialLightLevel(int lightPosition); static void __fastcall SetInitialLightLevel(int lightPosition);
 </code> </code>
Line 36: Line 41:
 ===== Sample Code ===== ===== Sample Code =====
  
 +For a multiplayer scenario, setting day/night based on user input.
 <code cpp> <code cpp>
 int InitProc() int InitProc()
 { {
-    // For a multiplayer scenario, set day/night based on user input. 
     TethysGame::SetDaylightEverywhere(0);     TethysGame::SetDaylightEverywhere(0);
     TethysGame::SetDaylightMoves(1);     TethysGame::SetDaylightMoves(1);
Line 51: Line 56:
  
 ----  ---- 
 + - //Go Back to [[op2_sdk:programming_scenario_dlls|Programming a Scenario]]//\\
  - //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/dayandnight.1453664831.txt.gz
  • Last modified: 2016/01/24 19:47
  • by vagabond