Behavior : Zigzag

Author:Rex.Rainbow

Download

Properties

Activated

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

Start

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

Rotatable

  • Enable to rotate sprite with command.
    • Options : ["No","Yes"]

Repeat count

  • The times to execute commands repeatly. 0 is infinity.

Commands

  • F=Move Forward, B=Move Backward, R=Turn Right, L=Turn Left, W=Wait. ex:"F 100;L 60"

Max moving speed

  • Maximum moving speed, in pixel per second.

Moving acceleration

  • Moving acceleration, in pixel per second per second.

Moving deceleration

  • Moving deceleration, in pixel per second per second.

Max rotation speed

  • Maximum rotation speed, in degrees per second.

Rotation acceleration

  • Rotation acceleration, in degrees per second per second. 0 is using max speed directly.

Rotation deceleration

  • Rotation deceleration, in degrees per second per second. 0 is ignored deceleration

Initial angle

  • Initial zigzag angle for non-rotatable mode, in degrees.

Precise mode

  • Force sprite move to target.
    • Options : ["No","Yes"]

Continued mode

  • Running zigzag as in continued-time.
    • Options : ["No","Yes"]

Actions

Command queue

Action:Set repeat count

  • Set times to execute commands repeatly. 0 is infinity.
    • Repeat count ( number ) : The times to execute commands repeatly. 0 is infinity.

Action:Clean command queue

  • Clean command queue.

Action:Add command

  • Add a command into command queue.
    • Command Type ( Combo ) : Command Types.
      • Options : ["Move (F)orward","Move (B)ackward","Turn (R)ight","Turn (L)eft","(W)ait"]
    • Parameter ( number ) : The parameter of command.

Action:Add commands

  • Add commands string into command queue.
    • Commansd ( string ) : Commands string. F=Move Forward, B=Move Backward, R=Turn Right, L=Turn Left, W=Wait. ex:"F 100;L 60"

Control

Action:Execution start

  • Start to execute command.

Action:Execution stop

  • Stop to execute command.

Moving

Action:Set maximum moving speed

  • Set the object's maximum moving speed.
    • Max moving speed ( number ) : Maximum moving speed, in pixel per second.

Action:Set moving acceleration

  • Set the object's moving acceleration.
    • Moving acceleration ( number ) : The moving acceleration setting, in pixel per second per second.

Action:Set moving deceleration

  • Set the object's moving deceleration.
    • Moving deceleration ( number ) : The moving deceleration setting, in pixels per second per second.

Rotation

Action:Set maximum rotation speed

  • Set the object's maximum rotation speed.
    • Max rotation speed ( number ) : Maximum rotation speed, in degrees per second.

Action:Set rotation acceleration

  • Set the object's rotation acceleration.
    • Rotation acceleration ( number ) : The rotation acceleration setting, in pixels per second per second.

Action:Set rotation deceleration

  • Set the object's rotation deceleration.
    • Rotation deceleration ( number ) : The rotation deceleration setting, in pixels per second per second.

Action:Set rotatable

  • Set rotatable.
    • Rotatable ( Combo ) : Set rotatable.
      • Options : ["No","Yes"]

Action:Set moving angle

  • Set moving angle in degree. Also rotate sprite at rotatable mode
    • Angle ( number ) : The angle of moving direction.

Setting

Action:Set activated

  • Enable the object's Zigzag behavior.
    • Activated ( Combo ) : Enable the behavior.
      • Options : ["No","Yes"]

Action:Set precise

  • Set precise.
    • Precise ( Combo ) : Set precise.
      • Options : ["No","Yes"]

Expressions

Current

Expression:Activated

  • The current activated state of behavior.

Expression:MovSpeed

  • The current moving speed, in pixel per second.

Expression:RotSpeed

  • The current rotation speed, in degrees per second.

Expression:CmdIndex

  • Get current command index in command queue. 0 is the first command.

Expression:MovAngle

  • The moving angle, in degree.

Setting

Expression:MaxMovSpeed

  • The maximum moving speed setting, in pixel per second.

Expression:MovAcc

  • The moving acceleration setting, in pixel per second per second.

Expression:MovDec

  • The moving deceleration setting, in pixel per second per second.

Expression:MaxRotSpeed

  • The maximum rotation speed setting, in degrees per second.

Expression:RotAcc

  • The acceleration setting, in degrees per second per second.

Expression:RotDec

  • The rotation deceleration setting, in degrees per second per second.

Expression:Rotatable

  • 1 to rotate sprite with command.

Expression:RepCnt

  • The times to execute commands repeatly. 0 is infinity.

Conditions

Command

Condition:Is executing command

  • Is executing command.
    • Command Type ( Combo ) : Command Types.
      • Options : ["Move (F)orward","Move (B)ackward","Turn (R)ight","Turn (L)eft","(W)ait","Any"]

Condition:On command queue finish

  • Triggered when command queue finish.

Condition:On command start

  • Triggered when command start.
    • Command Type ( Combo ) : Command Types.
      • Options : ["Move (F)orward","Move (B)ackward","Turn (R)ight","Turn (L)eft","(W)ait","Any"]

Condition:On command finish

  • Triggered when command finish.
    • Command Type ( Combo ) : Command Types.
      • Options : ["Move (F)orward","Move (B)ackward","Turn (R)ight","Turn (L)eft","(W)ait","Any"]

Moving

Condition:Compare moving speed

  • Compare the current moving speed of the object.
    • Comparison ( cmp ) : Choose the way to compare the current moving speed.
    • Speed ( number ) : The moving speed, in pixel per second, to compare the current speed to.

Rotation

Condition:Compare rotation speed

  • Compare the current rotation speed of the object.
    • Comparison ( cmp ) : Choose the way to compare the current rotation speed.
    • Speed ( number ) : The rotation speed, in degree per second, to compare the current speed to.