Set Motion of Vertical:Wrap


ASTER::ACTION::ObjectControl::MOTION::Vertical:Wrap

オブジェクト・インスタンスをモーション・コントローラに Vertical Wrap Motion として登録。

  • Wrap is an action that continues moving by warping to a specified coordinate when exceeding the specified area.

Motion: Overview

In the case of Vertical movement, virtual walls (The Virtual Walls) can be set at each coordinate on the top and bottom ends. When hitting the wall, the coordinate warps to the wall in the opposite direction of the movement, and then moves towards the wall in the moving direction again, repeating this routine.

When a collision (actually passing through coordinates) with a virtual wall is detected, an immediate execution condition is triggered, and the x|y coordinates or fixed values of the corresponding instance can be obtained from the dedicated conditions and expressions.

The amount of movement can be set as a floating point number. In the ASTER beta version, the minimum unit of movement was 1 frame time = 1 pixel, but the official version of ASTER achieves a finer resolution of movement.

When registering a motion group with the motion controller, you can use a "motion group name" arbitrarily decided by the user.


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

Serialize the 4 parameters into a single string and send it.

" 3.3 ,    false ,   -40 ,    680 "
Value Data Type Description
3.3 float Y movement amount
false boolean Start in stopped state (true, false)
-40 signed int Virtual wall (Top end coordinate)
680 signed int Virtual wall (Bottom end coordinate)

Additional Notes


Registration Limit 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.