Grid: L2RT2B


ASTER::ACTION::ALIGN::Left to Right, Top to Bottom, Grid

Align & arrange instances in a grid pattern from left to right, top to bottom, using the image dimensions (width and height) of the instances.

During the execution of the CF25 application, the coordinates of the selected object instance are aligned and modified.

Only sprite (Active) object types can be selected.


Parameter.1

Select the object instance. Only the "Active (sprite) Object" Type can select.

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 process will be aborted.


Parameter.2

  "100, 100,  3, +10, +10, true"
Name Type Description
setup x position int X coordinate to start placing
setup y position int Y coordinate to start placing
Grid Width unsigned int Grid width, unsigned integer
offset-x int Offset value for x-position adjustment: negative values possible
offset-y int Offset value for y-position adjustment: negative values possible
Animation Frame Change Flag boolean true = Force change of animation frame

The value specified by Grid Width is the maximum number of rows in the horizontal direction of the grid, and the number of instances to be arranged horizontally.


About the Internal Processing.. Read More
Internal Processing

Change the animation frame of the object instance and align it at equal intervals by referring to the image width.

When aligning, forcibly stop the animation, assign a serial number according to the number of instances, and assign the serial number to the variable Alterable Variables A of the instance.

Image Width + Offset Value

Forcibly change the animation frame of the instance using the serial number. By referring to the image width of the newly selected animation frame, it can be aligned with individual image widths, and you can display the list of animation images on the screen.

An option to forcibly change the animation frame at the same time as aligning is selectable.

  • If true, change the animation frame when aligning.

  • If false, do not stop the animation or change the animation frame.


Notes

The Alignment function does Not use floating point numbers as parameters. Here is a sample as an Error。

Parameter Error Sample..
"1.00"

Parameters cannot be written without regard to data type.

Although some template parameters are compatible, the number of parameters is basically different, so please avoid diverting parameters to other templates without verifying the operation.

About Reserved Variables.. Read More

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.