Best way to implement a calendar

Discussion and feedback on Construct 2

Post » Sat Nov 26, 2011 2:54 pm

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...?"Ishkur2011-11-26 14:58:50
Posts: 1
Reputation: 427

Return to Construct 2 General

Who is online

Users browsing this forum: TheRealDannyyy and 12 guests