Best way to implement a calendar

0 favourites
  • 1 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • Hey guys, I'm new here. I have some ideas on how to implement something and I'd like some feedback.

    I'd like to be able to keep track of time passed in game, in years, months, and days.

    To implement this, I plan on making a new behavior object in the SDK. The object will have variables to hold the current y = year, m = month, d = day, and t = total number of minutes spent in game.

    Once t reaches a certain number, t will reset to zero and d will ++1. Once d reaches a certain number (say, 30), d will reset and m will ++1, etc.

    What I want to know if this is a simple and straightforward way to implement this calendar.

    Also, will other behaviors (say behaviors of npcs that will act differently on different days/dates) be able to have access to and reference the calendar behavior's time variables y/m/d ?

    Thanks a lot for the input.

    Edit: I'm in the wrong forum! Please move me to "How do I...?"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)