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 returnstrueif that amount of time has not yet passed.
Example: Daily Reward
- Create Property: A Player DateTime property called
LastRewardClaim. - Event: A
Player Interactevent on a reward chest. - Action: A
Conditionalaction.- 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).
- Property:
- If Actions:
- Give the player their reward.
- Use
Change Propertyto Set Current on theLastRewardClaimproperty, starting the cooldown.
- Else Actions:
- Send a message: "You have already claimed your reward today!"
- Condition: