Behavior : Spline

Author:Rex.Rainbow

Download

Properties

Activated

  • Enable if you wish this to begin at the start of the layout.
    • Options : ["No","Yes"]

Speed

  • Speed, in pixel per second.

Set angle

  • Set the object's angle to the angle of motion.
    • Options : ["No","Yes"]

Looping

  • Enable to connect last point to start point.
    • Options : ["No","Yes"]

Tension

  • Tension of curve.

Actions

Enable

Action:Set enabled

  • Set whether this behavior is enabled. It will also pause current moving.
    • State ( Combo ) : Set whether to enable or disable the behavior.
      • Options : ["Disabled","Enabled"]

Action:Enable set angle

  • Enable or disable "Set angle property".
    • State ( Combo ) : Set whether to enable or disable the behavior.
      • Options : ["Disabled","Enabled"]

Action:Set looping

  • Enable or disable looping.
    • Enable ( Combo ) : Enable to connect last point to start point.
      • Options : ["No","Yes"]

Move

Action:Start

  • Start moving.

Action:Stop

  • Stop moving.

Path

Action:Add point

  • Add a point on the spline path to go through.
    • X ( number ) : The X co-ordinate of this point.
    • Y ( number ) : The Y co-ordinate of this point.

Action:Reset position

  • Reset position of point. Can not reset current moving segment.
    • Index ( number ) : Index of point.
    • X ( number ) : The X co-ordinate of this point.
    • Y ( number ) : The Y co-ordinate of this point.

Action:Clean all points

  • Clean all points. It will stop current moving.

Speed

Action:Set speed

  • Set the object's speed.
    • Speed ( number ) : Speed, in pixel per second.

Tension

Action:Set tension

  • Set tension of curve.
    • Tension ( number ) : Tension of curve.

Expressions

Angle

Expression:AngleOfMotion

  • Get angle of motion.

Current segment

Expression:CurSegP0

  • Get start point index of current segment. Add 2nd parameter "x" or "y" or 0 or 1 to get x/y of a point.

Expression:CurSegP1

  • Get end point index of current segment Add 2nd parameter "x" or "y" or 0 or 1 to get x/y of a point.

Distance

Expression:TraveledDistance

  • Traveled distance, in pixels.

Point

Expression:Point

  • Get points or a point or x/y of a point. Add 1st parameter for index of point, add 2nd parameter "x" or "y" or 0 or 1 to get x/y of a point.

Expression:PointsCount

  • Get amount of points.

Speed

Expression:Speed

  • The current object speed, in pixels per second.

Tension

Expression:Tension

  • The tension of curve.

Conditions

Condition:Is moving

  • Is object moving.

Reach

Condition:On reach last point

  • Triggered when reach last point.

Condition:On reach any point

  • Triggered when reach any point.