Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
op2_sdk:dayandnight [2016/01/24 19:47] – created vagabond | op2_sdk:dayandnight [2016/01/25 23:31] – vagabond | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Day and Night Cycles ====== | ====== Day and Night Cycles ====== | ||
+ | |||
+ | '' | ||
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); | ||
+ | </ | ||
- | From GameMap | + | GameMap |
+ | <code cpp> | ||
static void __fastcall SetInitialLightLevel(int lightPosition); | static void __fastcall SetInitialLightLevel(int lightPosition); | ||
</ | </ | ||
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:: | TethysGame:: | ||
TethysGame:: | TethysGame:: | ||
Line 51: | Line 56: | ||
---- | ---- | ||
+ | - //Go Back to [[op2_sdk: | ||
- //Go Back to [[op2_sdk: | - //Go Back to [[op2_sdk: | ||
- //Go Back to [[outpost_2: | - //Go Back to [[outpost_2: | ||
- //Go Back to [[http:// | - //Go Back to [[http:// |