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

rex_value_interpolation

Plugin, ACE table, Discussion thread
Dependence: rex_timeline plugin

Introduction
Changing value in a duration.

Usage
Sample capx
Call "Action:Change value" to increase or decrease current value with a step (property "Step") each duration time (property "Duration), until target value.
For example, if current value is 0, and "Step" is 1, "Duration" is 0.1, and the target value is 10, then the value will change to 1, 2, 3, ... 10 for each 0.1 second.
"Condition:On value changing" will be triggered while value changed, get current value by "Expression:Value", and the target value is "Expression:TargetValue".
"Condition:On hit target value" will be triggered while hitting the target value.
"Condition:Is value changing" will return true if value is changed in this tick.
Step
Step is set in property 'Step" or "Action:Set step". Read it back by "Expression:Step".
Duration
Duration of value changing is set in property "Duration", or "Action:Set duration". Read it back by "Expression:Duration".
Pause or resume
Call "Action:Pause" or "Action:Resume" to pause or resume the value changing.

Set value
Call "Action:Set value" to set the value immediately, it will not trigger "Condition:On value changing" or "Condition:On hit target value".

Save/load
This behavior supports official save/load.

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