MvtUtil: Toggle mvt.Target Selection State


ASTER::ACTION::MotionControl::MvtUtil: Select or DeSelect as mvt.Target

Select or deselect any instances of “Active Object” as mvt.Target.

In ASTER's MoveTowards, users can group arbitrary object instances into Group A and Group B through manual operations. As a support function for recording these selections, MvtUtil is available.

In this document, Group A is referred to as mvt.Target, and Group B is referred to as mvt.Pursuer.

The selection state of instances is managed by ASTER.

If an instance has already been selected as mvt.Target, selecting it again will deselect it. This specification prevents bugs such as double-selecting an already selected instance.


Parameter

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.


Event Creation:

Create a condition-checking process that directly specifies instances, such as a mouse click event.

Minion Minion


Batch Selection of Multiple Instances

This function does not support CF25’s action loops.

When this function is used without specifying any object instances, only the most recently created object instance will be selected (or deselected if it is already selected).

For batch selection, either create a custom event using CF25’s fast loops, or use Batch Selections: mvt.Target.

  • Note: ASTER rev.1.0.3 does not implement Batch Selections: mvt.Target.

How to Create a Simple Random Selection

Example using the Pick at Random function

Minion Minion

With CF25’s random pick feature, you can easily create events that randomly select (or deselect) object instances.


Notes.1

Set the maximum number of instances that can be selected simultaneously

You can change this using the command MvtUtil: Adjust the max selections for mvt.Target & mvt.Pursuer.

The default is a maximum of 1, with a maximum allowable value of 255.


Notes.2

To deselect all selections at once:

Use the command DeSelect All: mvt.Target & mvt.Pursuer.


Selection Restriction.1

Disabling Selection Operations

The instance selection feature of MvtUtil only works with instances that are not registered in the motion controller.

If a selected object instance has already been added to ’the motion group’ controlled by ’the motion controller’, the selection operation will not work.


Selection Restriction.2

Instances selected as mvt.Pursuer cannot be selected as mvt.Target.

In this case, first, deselect mvt.Pursuer, and then reselect it as mvt.Target.


Export Selection

Information about the selected instances can be exported to a JSON array.