zscript-doc/api/global/data/Game.md

87 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2018-12-29 16:05:19 -08:00
# Game State
TODO
```
2019-04-07 03:11:50 -07:00
readonly bool AutomapActive;
readonly bool DemoPlayback;
readonly uint GameAction;
readonly int GameState;
readonly int GameTic;
play LevelLocals Level;
readonly MusPlayingInfo MusPlaying;
deprecated("3.8") readonly bool GlobalFreeze;
2018-12-29 16:05:19 -08:00
int ValidCount;
```
2019-08-14 03:31:41 -07:00
### `AutomapActive`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
`true` if the auto-map is currently open on the client. **Not deterministic.**
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `DemoPlayback`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
User is watching a demo.
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `GameAction`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
Current global game action. May be one of:
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
| Name | Description |
| ---- | ----------- |
| `ga_autoloadgame` | Don't use this. |
| `ga_autosave` | Creates an autosave. |
| `ga_completed` | Don't use this. |
| `ga_fullconsole` | Don't use this. |
| `ga_loadgamehideicon` | Don't use this. |
| `ga_loadgameplaydemo` | Don't use this. |
| `ga_loadgame` | Don't use this. |
| `ga_loadlevel` | Don't use this. |
| `ga_newgame2` | Don't use this. |
| `ga_newgame` | Don't use this. |
| `ga_nothing` | Does nothing. |
| `ga_playdemo` | Don't use this. |
| `ga_recordgame` | Don't use this. |
| `ga_savegame` | Don't use this. |
| `ga_screenshot` | Takes a screenshot. |
| `ga_slideshow` | Don't use this. |
| `ga_togglemap` | Toggles the auto-map. |
| `ga_worlddone` | Don't use this. |
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `GameState`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
Current global game state. May be one of:
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
| Name | Description |
| ---- | ----------- |
| `GS_DEMOSCREEN` | Inside a level but watching a demo in the main menu. |
| `GS_FINALE` | Reading a cluster end text or at the end sequence. |
| `GS_FULLCONSOLE` | Outside of a level, console only. |
| `GS_HIDECONSOLE` | Outside of a level, console hidden (i.e. main menu.) |
| `GS_INTERMISSION` | In between levels. |
| `GS_LEVEL` | Inside a level. |
| `GS_STARTUP` | Game not yet initialized. |
| `GS_TITLELEVEL` | Watching a `TITLEMAP` in the main menu. |
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `GameTic`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
Number of game tics passed since engine initialization. **Not deterministic.**
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `Level`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
All level info as defined in `LevelLocals`.
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
### `MusPlaying`
2019-04-07 03:11:50 -07:00
2019-08-14 03:31:41 -07:00
TODO
2019-04-07 03:11:50 -07:00
2019-08-14 03:31:41 -07:00
### `GlobalFreeze`
2019-04-07 03:11:50 -07:00
2019-08-14 03:31:41 -07:00
Deprecated. Don't use.
2019-04-07 03:11:50 -07:00
2019-08-14 03:31:41 -07:00
### `ValidCount`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
Don't use this.
2018-12-29 16:05:19 -08:00
<!-- EOF -->