Set Orbital::Own Xy


ASTER::ACTION::ObjectControl::MOTION::Orbital::OwnXy

Register the object instance to the motion controller as Orbital Motion :: Own Xy.

  • Set its own coordinates as the center of the orbit and move in a circular path.

  • If a target is later assigned to ownXy, it will become TargetXy.


  1. Startup Angle

  2. Offset Value from Center Point

  3. Orbital-Specific Sleep Operation

This motion template includes the above three option settings. Sleep is an Orbital-specific feature where the sleep trigger activates when the specified angle is reached.


Parameter.1

Select the object instance. Only the "Active (sprite) Object" Type can be registered to the controller.

Description of the image

If "The Active Object" is not specified, an error will be displayed when executing the action from the event, and the registration process will be aborted.


Parameter.2

Enter the motion group name to register to the motion controller.

Even instances created from different objects can be grouped with the same motion group name and managed by the controller.

Instances already registered to the controller cannot be duplicately registered under a different group name.

Multibyte strings (such as Japanese) can also be used, but for practical purposes, short names in lowercase letters are recommended.

"test"

When using the name set to the active object as the motion group name for registration, send an empty string.

""

Parameter.3

Send a single string containing 12 individual parameters to the controller.

"125, 125, +1,   false,   0, 45,  0,0,   false, 30, -1, 45"
See Actual Operation..

Minion Minion

No. Abbreviation Value Data Type Description
0 Rad.1 125 unsigned int Radius1 (pixels)
1 Rad.2 125 unsigned int Radius2 (pixels)
2 ω +1.0 Float Angular Velocity
3 Stop on Start Flag false Boolean Start in stopped state (true: stop at startup, false: do not stop)
4 Setup ∠ 0 int Starting Angle
5 Step ∠ 30 int Step Angle
6 ofst x 0 int Offset x Value
7 ofst y 0 int Offset y Value
8 Start with Slp false Boolean Start with sleep (true: yes, false: no)
9 Time of Slp 30 unsigned int Frame time for sleep
10 Rept -1 int Number of sleep repetitions (enter 0 if sleep is not needed)
11 Slp ∠ 45 unsigned int Sleep Trigger Angle
Radius »

Radius ( unsigned int )

Set the radius of the circular motion with an unsigned integer. The unit is pixel.

To support "elliptical orbit," you can individually set the vertical and horizontal radius values with Radius.1 and Radius.2.

Angular Velocity »

Angular Velocity ( float )

Specify the angular velocity with a signed floating-point number. Negative values indicate clockwise motion, while positive values indicate counterclockwise motion.

In the beta version, the parameter values were integers only, but the official version supports floating-point numbers.

Angular velocity represents the amount of movement in angle units. The larger the value, the faster the movement. The angle completes a full circle at 360 degrees, with values ranging from 0 to 359.

In circular motion, angular velocity (ω) and radius (r) are related to the linear distance traveled (linear velocity = v). For the same angular velocity (ω), the smaller the radius (r), the smaller the linear velocity (v), resulting in slower movement. Conversely, with a larger radius (r), the linear velocity (v) is greater, resulting in faster movement.

Stop on Start Flag »

Stop on Start Flag ( boolean )

Specify the behavior at the start of the motion with a boolean value. This determines whether the Stop command is enabled when starting the motion.

  • If true, the stop command is enabled at the start of the circular motion, and the object does not move.

  • If false, the circular motion starts without being stopped, and the object begins to move.

If you set it to true to stop the motion, you can issue the toggle Stop command to resume the motion.

Setup Angle »

Setup Angle ( int )

Specify the angle at which circular motion starts. You can specify a value between 0 and 359, counterclockwise, and negative values are also allowed.

By using the Step Angle value described later, you can evenly place instances in a circular pattern at a certain angle from the starting angle.

Minion Minion

In the image above, the Starting Angle is specified as 0, and the Step Angle is 30, arranging 7 instances in a semicircle.

Step Angle »

Step Angle ( int )

This parameter is closely related to the previously mentioned starting angle. It specifies the step angle for placing instances on the circumference.

The initial angle is calculated by adding the value specified by the starting angle to the value obtained by multiplying the step angle by the processing order number.

Initial Angle = Starting Angle + (Step Angle * Processing Order Number)

For example, with a step angle of 30, 7 instances, and a starting angle of 0, the calculation would be as follows:

  • instance[0] = ( 0 + ( 30 * 0 ) ); » 0 degree
  • instance[1] = ( 0 + ( 30 * 1 ) ); » 30 degree
  • instance[6] = ( 0 + ( 30 * 6 ) ); » 180 degree
Offset X & Y »

Offset X & Y ( int )

Set the distance from the center coordinates of the circular motion as an offset value. If the offset value is not 0, the new center point of the orbit is determined by adding the offset value to the current center coordinates.

Start with Sleep Flag »

Start with Sleep Flag ( boolean )

This flag determines whether to start motion with sleep applied or to start motion without applying sleep.

To completely disable the pause function using sleep from the parameters, set the repetition value to 0 as described later.

Orbital sleep is a unit specification for angular movement exclusive to Orbital and is not compatible with generic sleep commands. Note that commands to add Orbital-specific sleep commands later are also not implemented. ASTER Version1.0.0

Frame Time of Sleep »

Frame Time of Sleep ( unsigned int )

This is a parameter dependent on the application's operation settings, specifying the duration of the pause state. The time unit is the application's frame time (FPS).

For example, if the application is set to 60 FPS, meaning it updates the drawing 60 times per second, a value of 60 corresponds to approximately one second. If the Frame Time of Sleep is set to 60, the object instance will also pause for approximately one second.

Repetition Number »

Repetition Number ( int )

Specify the number of times to resume operation and enter sleep mode again after sleep (pause operation) is released. The value can be a signed integer from -1 to any integer greater than 0.

If you do not use the sleep function, assign a value of 0 to the Repetition value. The sleep command is designed to repeat execution and release, and setting the number of repetitions to 0 disables the sleep command.

If a value greater than or equal to zero is assigned to the Repetition value, the value is decremented by 1 each time sleep is released. When the Repetition value eventually reaches 0, the repetition of the sleep command ends.

If a negative value is assigned, it is designated as an infinite loop and sleep release, operation resume, and sleep state will be repeated indefinitely.

Sleep Trigger Angle »

Sleep Trigger Angle ( int )

The Orbital uses angular velocity because it moves in a circular motion, unlike other motions. The sleep command for Orbital specifies the trigger angle.

Trigger Angle uses an unsigned integer (negative values are invalid) and repeatedly subtracts 1 until the value reaches 0, using the absolute value of the Angular Velocity.

When the Trigger Angle value reaches zero, it is considered to have reached the specified angle, at which point the sleep command is executed, putting the instance into a pause state for the specified frame time.


Further Information


Registration Limits and Reserved Variables »

Maximum Number of Registrations Allowed

The maximum number of instances that can be registered in one motion group is 255. A motion group can register up to 255 groups per motion type.

Type Max Groups Max Instances (Per Group) Total Instances (Per Motion Type)
Null 255 255 255 x 255 = 65,025
Flp | Wrp 255 255 255 x 255 = 65,025
Flp | Wrp::SineWave 255 255 255 x 255 = 65,025
Orbital 255 255 255 x 255 = 65,025
MoveTowards 255 255 255 x 255 = 65,025

The above values are theoretical and exceed the processing capability of CF25, so operation will always be conducted below the maximum values.

Practically, it is assumed that all registered motions will operate with a total number of instances below 100.


About Reserved Variables

From the object instance variables, the reserved variables are as follows:

  1. Alt Variable[0] = Spread ID

  2. Alt Variable[1] = Motion ID

The above variables are used.

Alt Variable[0]

Sequential number. The last object instance created on the frame editor is assigned 0, and then each instance is assigned a value incremented by +1 in order. It is safe to overwrite with any value.

Alt Variable[1]

Motion type. Values ranging from 0 to 4 are assigned according to the motion type at the time of registration. It is a magic number to speed up database searches. If changed, the controller will not be able to search correctly, which is dangerous.

From rev.0.9.x onward, a method of not using Alt Variable[1] has been tested, and it is not used now, but it may be reverted, so please treat Alt Variable[1] as a reserved variable.