Jump to content

Day/Night Cycle [2.55][Tint.zh]

Overview
Creator: Emily Updated: 31 May 2021 Tags: 2.55, Global Downloads: 81
Rating[?]: No rating
Download Package
(0.95 KB)
Information

Description Setup Reviews Comments

Headers: Requires Tint.zh, std.zh

Set the constants near the top of the DayNight namespace.
DAY_LENGTH: Time, in minutes, for day and night to last (they each last the same time)
ONLY_OUTDOORS: If true (which is default), will not do tinting while indoors (i.e. not on an overworld screen). The timer will still run.
NIGHT_R, NIGHT_G, NIGHT_B: RGB values for the tint. These are set to a default tint for darkness, though different tilesets may work better with different tints, so I made these constants that you can modify.

Scripts:
An Init Script is included, as defined by Tint.zh setup. This also includes an additional init line, to initialize the night tint.
A onContinue script is included, as defined by Tint.zh setup.
An active script is included. This handles the actual timer, and the calls to toggle day/night based on the timer. It also includes a call to `DayNight::handletint()`, which handles the indoors/outdoors option, and `TintZH::runTints()`, as required by Tint.zh.