What is the simplest way to make an advent calendar?

0 favourites
  • 3 posts
From the Asset Store
Calendar Template
$8 USD
20% off
c3p file of my tutorial make calendar in construct 3
  • Hello!

    I want to make an advent calendar, hosted online, that keeps track of what date it is and only allows you to open the current door and the ones before it.

    Picture for reference:

    It seems that I need the date plugin as well as local storage?

    My problem is that in all the documentation I've found there is a level of programming knowledge assumed that I do not possess. I will have sprites that can only be clicked if the date is right or has passed. Shouldnt need a buttload of code, right?

    Tagged:

  • If it is for personal use only you can just use the browser plugin. If you want to sell it you should use an online databank.

    But I assume that you use it personal.

    On start of layout set the following variables:

    current_month = mid((Browser.ExecJS("Date()")),4,3)
    current_day = mid((Browser.ExecJS("Date()")),8,2)
    current_year = mid((Browser.ExecJS("Date()")),11,4)

    Save the door numbers in a variable door_number inside the door sprites.

    Then on door sprite creation check the local storage to find if there is the door_number safed as open. If so show an open door instead.

    On door sprite clicked compare two values:

    current_year = 2022
    current_month = "Dec"
    current_day >= sprite.door_number
    	-> do stuff and safe to local storage that you opened the door
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That did the trick! Thanks for your help!

    Yeah it is not something I want to sell, but share with people who find it interesting.

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