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

rex_parse_timer

Plugin, ACE table, Discussion thread
Dependence:
rex_parse_initialize

Introduction
Get elapsed interval from parse server.

Usage

Sample capx
Prepare
Add 
rex_parse_initialize to set api id and javascript key.
Class name
"Class name" in properties table is the "table name" shown at dash board.

Start timer
Call "
Action:Start" to start a timer. "Condition:On start timer" will be triggered while starting success, otherwise "Condition:On start timer error" will be triggered.
Get timer
Call
  • "Action:Get or start" to get a timer , or start a timer if not exists.
  • "Action:Get" to get a timer.
"Condition:On get timer" will be triggered while get timer back success, otherwise "Condition:On get timer error" will be triggered. 
"Condition:Is valid" returns true if get a timer.
Time-out interval
The parameter "Interval" in
"Condition:On start timer" or "Condition:On get timer" is a time-out interval which is an optional value in this timer to test if it is time-out now by "
Condition:Is time-out" under "Condition:On get timer".
Expression of timer
These expressions of a timer could be used under
"Condition:On start timer" or
"Condition:On get timer"-
  • Expression:LastUserID, Expression:LastTimerName: owner ID of this timer, and timer name.
  • Expression:LastStartTimestamp, Expression:LastCurrentTimestamp: start time or current time, uses it to show current date and time.
  • Expression:LastElapsedTime: current time - start time , uses it in stopwatch.
  • Expression:LastTimeoutInterval: time-out interval , uses it in count down timer.
  • Expression:LastRemainInterval: elapsed time - time-out interval , uses it in count down timer.
Cache mode
Set "
Cache" to "Yes" in properties table to enable cache mode.
In this mode, the object of timers would be cached to reduce the querying of these objects. So that the request count of each
"Action:Get" would be 1 if object of timer is cached.
If
"Cache" is "No",  the request count of each "Action:Get" would be 2.

Remove timer
Call "Action:Remove" to remove the timer. "Condition:On remove timer complete" will be triggered while removing success, otherwise "Condition:On remove timer error" will be triggered.

Compare with rex_time_away
rex_time_away or rex_time_awayL gets the elapsed time from local system time, which might be changed by user.
This plugin
gets the elapsed time from parse service. It might be more credible.

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