Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_date

Plugin, ACE table, Discussion thread
Dependence: None

Introduction
Get system date and time.

Usage
There are 2 ways to get date and time:
  1. use "Expression:Year", "Expression:Month", "Expression:Date", "Expression:Date", "Expression:Day", "Expression:Hours", "Expression:Minutes", "Expression:Seconds", "Expression:Milliseconds" to get current system date and time. (Sample capx)
  2. Get unix-timestamp by "Expression:UnixTimestamp" first, it is a number. Then use use "Expression:Year(unixtimestamp)", "Expression:Month(unixtimestamp)", "Expression:Date(unixtimestamp)", "Expression:Date(unixtimestamp)", "Expression:Day(unixtimestamp)", "Expression:Hours(unixtimestamp)", "Expression:Minutes(unixtimestamp)", "Expression:Seconds(unixtimestamp)", "Expression:Milliseconds(unixtimestamp)" to get date and time mapped from unixtimestamp. User could save this unixtimestamp value to save date&time. (Sample capx)

Unix-timestamp
Sample capx
"Expression:Date2UnixTimestamp" could transfer date&time to unixtimestamp, it has at least 3 parameters year,month,day.
Get delta time by unix-timestamp
Sample capx
Get delta time by subtract two
output of "Expression:Date2UnixTimestamp, the unit is milliseconds

Local expression
Sample capx
Get local date expression string by "
Expression:LocalExpression". Or
"Expression:LocalExpression(unixtimestamp)" to transfer timestamp to
local date expression.

Timer for escaped time
Get escaped time
Sample capx
  1. Call "Action:Start" to start a timer by recording current time-stamp. 
  2. Get escaped time by "Expression:Timer", in second.
This escaped time will not be affected by time scale setting.
Pause or resume
Call "Action:Pause" or "Action:Resume" to pause or resume the timer.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About