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

rex_physics_speedclamp

Plugin, ACE table, Discussion thread
Dependence: Official physics behavior

Introduction
Clamp speed between upper and lower bounds., stand on official physics behavior.

Usage
Sample capx
Prepare
Put this behavior under official physics behavior.
图片
Upper or lower bound
Set upper bound and lower bound of speed in properties table "Upper bound", "Lower bound", or set by "Action:Set upper bound", "Action:Set lower bound".
Read back these values by "Expression:UpperBound" or "Expression:LowerBound".
Speed clamp
Speed will be clamped in a range if upper bound is not equal to lower bound. In this case, "Condition:On hit upper bound" or "Condition:On hit lower bound" will be triggered while current speed is larger than upper bound, or smaller than lower bound.
If upper bound is equal to lower bound, speed will be fixed in upper bound, no triggered event will be fired.
Get current speed by "Expression:CurSpeed".
Activated
Set property "Activated" to "No", or set by "Action:Set activated" to disable this behavior.


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