Voxel Game Maker

Docs Cookbook

Day and night

Select the world in the Explorer. Day & night: set Day length (minutes)

#Without code

  1. Select the world in the Explorer. Day & night: set Day length (minutes) and the Time of day it starts at.
  2. Lamps: a Light with Only at night.
  3. Things that happen at dusk: a Trigger with When night falls (or morning comes), such as Show popup "The wolves come out".
  4. Check the time in any Rule with If It is night.
  5. Skip ahead (a bed): Then Set time of day (Hour 6).

Quick code:

if is_night() then
  popup("You sleep till morning.")
  set_hour(6)
else
  popup("It's " .. hour() .. " o'clock.")
end