Game Maker

DateTime

A property type for storing a real-world date and time.

The DateTime property type stores a specific point in real-world time (a timestamp). This is useful for creating mechanics based on real time, such as daily rewards or long-term cooldowns.

  • Default Value: null

Common Use Cases

  • Storing the last time a player claimed a daily reward.
  • Creating an ability cooldown that persists even if the player logs off.
  • Tracking when a map feature was last used globally.

Operators (in Change Property action)

  • Set Current: Sets the property's value to the exact date and time the action is run.

Checks (in Property Condition)

  • Is On Cooldown: This is the primary check. It compares the stored timestamp to the current real-world time. You provide a duration (e.g., 24 hours), and the condition returns true if that amount of time has not yet passed.

Example: Daily Reward

  1. Create Property: A Player DateTime property called LastRewardClaim.
  2. Event: A Player Interact event on a reward chest.
  3. Action: A Conditional action.
    • Condition: Property Condition
      • Property: LastRewardClaim
      • Holder: Player
      • Check: Is On Cooldown
      • Value: 24 hours
      • Invert: True (This makes it check if the cooldown has expired).
    • If Actions:
      • Give the player their reward.
      • Use Change Property to Set Current on the LastRewardClaim property, starting the cooldown.
    • Else Actions:
      • Send a message: "You have already claimed your reward today!"