Basic Alignment Templates


These functions select an alignment template during the execution of the application to evenly position object instances from a specified location. Supported objects are active (Sprite) only.

About the Align Function

In addition to changing positions, it simultaneously performs variable assignments and animation frame operations.

  • Change the position of object instances.

  • Assign Squential Numbers to reserved variables of instances.

  • For instances with animations, it aligns the objects, changes the animation frames using assigned sequential numbers simultaneously with the alignment, and stops the animation.


List of Alignment Templates

Executes optimal equidistant arrangement while obtaining Animation image sizes of the instances.

Template names are long, so abbreviations are used according to the direction of placement.

For example, Left to Right is abbreviated as L2R, and Top to Bottom is abbreviated as T2B.


Alignment Parameters: Sample

You can adjust the alignment position with parameters. Below are sample parameters for Grid:L2RT2B.

"100, 100,  3, +10, +10, true"

ASTER::Align adopts a method where different data types are converted to strings, combined into one parameter, and sent as a unified entity. This is compatible with JSON strings.


Explanation of Alignment Parameters

Using sample parameters of Grid:L2RT2B, we explain the variable types that can be used.

Sample Parameter :: Grid L2RT2B..
"100, 100,  3, +10, +10, true"
Param Type Detail
100 Int X pos
100 Int Y pos
3 Unsigned Int Number of Grid Rows
+10 Int offset value for x coordinate
+10 Int offset value for y coordinate
true Boolean Force Change the Animation Frame

Points to Note:

  • Align uses only integer values.

  • There are two types of integers: unsigned and signed.

  • Unsigned integers are primarily used to avoid the input of negative values.

  • When applicable, it is recommended to use signed values for better readability.

  • Boolean values can only be true and false in lowercase.


The specifications regarding data types are as follows. Below are the notes on formatting:

  • Each template has a dedicated format for its parameters.

  • Parameters that fail to parse will result in a syntax error.

  • Whitespace can be used freely for better readability.


Parameter Specifications: Whitespace

Whitespace can be freely inserted into parameters for better readability. The following extreme example is also possible.

" 1 0 0 ,  1 0 0 ,  3 ,  + 1 0 , + 1 0 ,  t r u e "

Parameter Specifications: Plus and Minus Signs

There are cases where negative values are not allowed for the plus and minus signs of numbers.

The + and - signs are recommended for use with offset values for better parameter readability.

When unsigned is specified, there is a clear premise that the value is a positive number and an absolute value. Therefore, adding a sign, even a plus sign, will result in a formatting error.


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.