Jump to content

Day/Night cycle [<2.55]

Overview
Creator: Emily Added: 16 Jan 2018 Tags: Global
Rating[?]: No rating
View Script
Information

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.
Note: Enemies may respawn, and bushes or temporary secrets may reset on the screen Link is on when day/night switch.