Targeted JSON Pointer: Batch Assignment for Oi Alt Values[n]


using Targeted JSON Pointer..

ASTER::ACTION::JSON::Targeted JSON Pointer::Batch Assignment Oi Alt Values

Batch assignment function for alterable variables of object instances.

  • Utilizes a pre-configured Targeted JSON Pointer.

  • The target is a JSON array, and the JSON array contains “numerical values”. For example:

{
    "values":[
        9,8,1, 
        5,7,2, 
        4,3,6 
    ]
}

JSON specification for numeric values

Function Overview

Assign the numeric value read from the array to Alt Values[n] of the object instance.

The precondition is that the JSON array contains numeric values, but it also tries to convert non-numeric values to numeric values as much as possible. (For example, the boolean true is converted to 1, and false is converted to 0.)

In the JSON specification, numeric values are stored as Double, and when passed to CF25, floating-point numbers are rounded to Float.

Strings are also converted to numeric values. For example, "123" is converted to 123.

Therefore, even if numbers, booleans, and strings are mixed in the JSON array, there will be no errors as long as they can be converted.

{
    "batchAssign_val":[ 
                        9,8,1, 
                        5,7,2, 
                        4,3,6
                        ],
    "batchAssign_bool":[ 
                        true,false,true,
                        true,false,true,
                        true,false,true
                        ],
    "batchAssign_str":[ 
                        "1","2","3",
                        "9","8","7",
                        "4","5","6"
                        ],
    "batchAssign_float":[ 
                        1.00, 9.99, 0.56, 
                        5.7,  7.08, 0.2, 
                        0.4,  3.2,  4.689
                        ]
}

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 variable index as a positive integer, ranging from `0` to `31`?.