Skip to content

armandoalonso/shake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Shake

A Behavior that shakes the object, for Construct 3.

Author: piranha305
Website: https://piranha305.itch.io/
Download Latest Version : Version: 1.0.0.0
Made using c3ide2-framework

Table of Contents


Usage

To build the addon, run the following commands:

npm i
node ./build.js

To run the dev server, run

npm i
node ./dev.js

The build uses the pluginConfig file to generate everything else. The main files you may want to look at would be instance.js and scriptInterface.js

Examples Files




Properties

Property Name Description
Enabled Enable or disable the shake behavior.
Duration Duration of the shake in seconds.
Magnitude Magnitude of the shake.
Magnitude Mode Magnitude mode. (Select if the magnitude is constant or decays over time)
Shake Axis Shake axis. (Select which axis to offset)

Enabled

Description:
Enable or disable the shake behavior.
Type:
check

Duration

Description:
Duration of the shake in seconds.
Type:
float

Magnitude

Description:
Magnitude of the shake.
Type:
float

Magnitude Mode

Description:
Magnitude mode. (Select if the magnitude is constant or decays over time)
Type:
combo Options:

  • constant: Constant
  • decay: Decay

Shake Axis

Description:
Shake axis. (Select which axis to offset)
Type:
combo Options:

  • xy: Shake XY Axis
  • x: Shake Only X Axis
  • y: Shake Only Y Axis

Actions

Action Description
Enable Enable the behavior.
Start Shake Start the shake.
Stop Shake Stop the shake.
Set Duration Set the duration of the shake.
Set Magnitude Set the magnitude of the shake.
Set Magnitude Mode Set the magnitude mode of the shake. (Select if the magnitude is constant or decays over time)
Set Shake Axis Set the axis of the shake.

Enable

Description:
Enable the behavior.

Parameters:

Name Type Description
Enabled boolean Enable or disable the shake behavior.

Start Shake

Description:
Start the shake.

Stop Shake

Description:
Stop the shake.

Set Duration

Description:
Set the duration of the shake.

Parameters:

Name Type Description
Duration number Duration of the shake in seconds.

Set Magnitude

Description:
Set the magnitude of the shake.

Parameters:

Name Type Description
Magnitude number Magnitude of the shake.

Set Magnitude Mode

Description:
Set the magnitude mode of the shake. (Select if the magnitude is constant or decays over time)

Parameters:

Name Type Description
Magnitude Mode combo Magnitude mode.

Set Shake Axis

Description:
Set the axis of the shake.

Parameters:

Name Type Description
Shake Axis combo Shake axis.

Conditions

Condition Description
On Shake End Triggered when the shake ends.
Is Shaking Check if the shake is in progress.

On Shake End

Description:
Triggered when the shake ends.
Is Trigger:
true

Is Shaking

Description:
Check if the shake is in progress.


Expressions

Expression Description
Duration Get the duration of the shake.
RemainingDuration Get the remaining duration of the shake.
OriginX Get the origin X of the shake.
OriginY Get the origin Y of the shake.

Duration

Description:
Get the duration of the shake.
Return Type:
number

RemainingDuration

Description:
Get the remaining duration of the shake.
Return Type:
number

OriginX

Description:
Get the origin X of the shake.
Return Type:
number

OriginY

Description:
Get the origin Y of the shake.
Return Type:
number