Day/Night cycle [<2.55]
Overview
Creator:
Emily
Added: 16 Jan 2018
Tags:
Global
|
View Script |
Information
A simple script which allows day/night DMap switching.
If you are using ZC 2.55 or later, use the newer version: https://www.purezc.n...=scripts&id=339
If you are using ZC 2.55 or later, use the newer version: https://www.purezc.n...=scripts&id=339
Description Setup Reviews Comments
Only requires "std.zh"
- Create 2 DMaps which are on the SAME map, with different palettes.
- Create an item, of class Non-gameplay items. Take note of it's item ID. None of the stats matter, just make sure you don't use that item ID for anything else.
- Set the constants in the script.
- dayLength = number of minutes each day/night lasts. This is the time for each the day and the night, not both the day and the night. (Ex. If I set it to 8, day will last 8 minutes before night falls, then night will last for 8 minutes before dawn).
- I_NIGHT = This should be the item ID of the item from step 2.
- dayDMAP1 = the DMap number of your day DMap
- nightDMAP1 = the DMap number of your night DMap
- dayDMAP2 = a second day DMap, if you need a day/night cycle that affects multiple maps. Leave at -1 if not using.
- nightDMAP2 = a second night DMap, if you need a day/night cycle that affects multiple maps. Leave at -1 if not using.
- Either import the example global script, or combine it with your existing global script.



