API ReferenceGE Extensionsflowgraphnodesenvironment
Set Time of Day Node
- **File:** `flowgraph/nodes/environment/setTimeOfDay.lua`
Overview
- File:
flowgraph/nodes/environment/setTimeOfDay.lua - Name: Set Time of Day
- Category:
dynamic_instant - Icon:
simobject_timeofday
Sets the current Time of Day settings.
Pin Schema
| Dir | Type | Name | Flags | Description |
|---|---|---|---|---|
| in | flow | flow | Inflow for this node. | |
| in | number | time | Time of day (0-1). 0/1 = midday, 0.5 = midnight. | |
| in | bool | play | Play or pause the ToD progression. | |
| in | number | dayScale | hidden | Scalar for time while sun is up. |
| in | number | nightScale | hidden | Scalar for time while sun is down. |
| in | number | dayLength | hidden | Length of day in real-world seconds. |
| in | number | azimuthOverride | hidden | Constant azimuth override for day cycle. |
Tags
environment, tod
Hard Templates (time pin)
| Label | Value |
|---|---|
| Midday | 0 |
| Evening | 0.25 |
| Midnight | 0.5 |
| Morning | 0.75 |
Data Properties
| Property | Default | Description |
|---|---|---|
restoreTod | true | Restore ToD on stop (currently commented out). |
Key Methods
| Method | Description |
|---|---|
setTimeOfDay() | Sets mission module todChanged flag and calls core_environment.setTimeOfDay() with all parameters. |
workOnce() | Calls setTimeOfDay(). |
work() | In repeat mode, calls setTimeOfDay() every frame. |
See Also
- Directional Gravity - Related reference
- Get Cloud by ID - Related reference
- Get Fog - Related reference
- FlowGraph Guide - Guide