How do I create day and night

0 favourites
  • 7 posts
From the Asset Store
Setup and ready for your art, animations and story. Viral Storybook App Template.
  • how do I create day and night,like when the time is midnight change to night

  • First, you need the "Time" (Counter, Value, Sprite with animation, whatever you want).

    Then you need a method, to "show" that's night. You can make this with Layout-Effects or a dark layer with changing opacity.

    At last you have to say, when it's night (Counter have a special value) - show Night-Layer/special Layout-Effect.

    When it's day (...) hide Night-Layer/special Layout-Effect.

    Thats the simple answer

  • Well.....I didn't understand most of your answer,but thanks for answering.

    I already figured a way to make it.

    That's also a simple answer

  • What exactly you don't understand?

    You need the Time - a counter, a global value - that shows you, whats the time.

    Then you have to say, that when it's between 6am and 6pm it's day, between 6pm and 6am it's night.

    For day - or better say for the night you can use layout-effects or an dark, semitransparent layer, that will shown, when it's night.

    Thats the idea of day and night circle!

    But it would be interesting, how you did it now?

  • I don't need a counter I just need when the time is 12am it turn into night.

    At the beginning of the layout its day So I made a global variable set to 600 (10 minutes in real life ) and every 1 second it subtract 1

    When the global variable is 0 it Turns to night and wait another 600 seconds

    When those 600 seconds done it reset the global variable to 600 And turn to day again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your global variable with 600 is that what i mean with "you need a time"

    When your variable is 0 (and resetting) is what i mean with "say when it's night or day"

  • Ok,then the both solutions are good.

    Anyway thanks for your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)