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

rex_cooldown

Plugin, ACE table, Discussion thread
Dependence: rex_timeline plugin

Introduction
A controller to maintain cooldown.
...One can think of cooldown as the reload time and firing rate of weapons. For example, a machine gun has very fast firing rate, so it has a very low cooldown between shots. Comparatively, a shotgun has a long reload/cooldown time between each shots....

Usage
Sample capx
图片
Call "Action:Request a call".
  • If internal timer is not running, this behavior will trigger the event "Condition:On call accepted". Then start the internal timer with time-out to cooldown interval. Put events under this condition.
  • If internal timer is running, this behavior will trigger the event "Condition:On call rejected".
"Action:Request a call" -> "Condition:On call accepted" , or
"Action:Request a call" ->
"Condition:On call rejected"
Custom acceptable checking
If internal timer is not running, "Condition:On acceptable checking" will be triggered. Put "Action:Set acceptable" under this condition to assign the request result.
"Condition:On acceptable checking" is an option. Return accepted if no "Condition:On acceptable checking" in event sheet, or no "Action:Set acceptable" under this condition.

Cooldown interval
Cooldown interval could be set at properties table "Cooldown interval", or set by "Action:Set Cooldown interval" to set the next cooldown interval. It could not affect current setting of cooldown interval.
User could call "Action:Set Cooldown remainder time" to reduce the cooldwon interval while timer count down.

Compare to official function object
This behavior is similar with official function object -
  • "Action:Request a call" of this behavior could map to "Action: Call function"
  • "Condition:On call accepted" of this behavior could map to "Condition: On function"

Cooldwon mask
Put cooldown mask updating events under "Condition:On cooldown".

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