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

rex_backendless_timer

Plugin, ACE table, Discussion thread
Dependence:
rex_backendless_api

Introduction
Get elapsed interval from backendless.


Usage
Sample capx

Prepare
Add 
rex_backendless_api to set api id and secret key.
Class name
"Class name" in properties table is the "table name" shown at dashboard.


Set owner
Call "Action:Set owner" to set owner of timers before executing any timer commands.
Start timer
Call "
Action:Start" to start a timer.
"
Condition:On start timer" will be triggered while starting success, get triggered timer name by "
Expression:LastTimerName".
Otherwise "Condition:On start timer error" will be triggered, get error message by "Expression:ErrorMessage".
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, get triggered timer name by "Expression:LastTimerName".
Otherwise "Condition:On get timer error" will be triggered, get error message by "Expression:ErrorMessage".
"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. Testing 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 : ownerID of this timer, and timer name.
  • Expression:LastStartTimestamp, Expression:LastCurrentTimestamp : start time or current timestamp
  • 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.

Remove timer
Call "Action:Remove" to remove the timer.
"
Condition:On remove timer complete" will be triggered while removing success, get triggered timer name by "
Expression:LastTimerName".
Otherwise "
Condition:On remove timer error" will be triggered, get error message by "
Expression:ErrorMessage".

More samples
Get off-line time

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 backendless service. It might be more credible.


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