Operation

An operation reads a state, performs processes such as delays, randomization, or calculations, and writes the result back to the state. For a list of operations, see Operation components.

What is logic?

Logic is an operation that reads messages, performs various calculations, and notifies the result as a message.

Common logic settings

The settings for each logic component are as follows:

  1. The target and identifier of the message (Signal) that serves as the starting point for the calculation
  2. The calculation step (executed in order from the top)
  3. Add a step
  1. The target, identifier, and type for notifying the calculated result as a message (If “Signal” is selected as the message type, the message is sent when the calculation result is true)
  2. The operator and function to apply
  3. Argument 1
  4. Argument 2 (the number of arguments varies depending on the function)

List of operators and functions that can be set in logic

Operator / FunctionDescription
=Returns the value of the argument as is.
NotReturns false if the value is true. Otherwise, returns true.
MinusReturns the value with its sign inverted.
AddReturns the sum of two values.
MultiplyReturns the product of two values.
SubtractReturns the result of subtracting the value of argument 2 from argument 1.
DivideReturns the result of dividing the value of argument 1 by argument 2.
ModuloReturns the remainder after dividing the value of argument 1 by argument 2.
EqualsReturns true if two values are equal. Otherwise, returns false. For Float types, returns true if the two values are within a small range of each other.
NotEqualsReturns false if two values are equal. Otherwise, returns true. For Float types, returns false if the two values are within a small range of each other.
GreaterThanReturns true if the value of argument 1 is greater than argument 2. Otherwise, returns false.
GreaterThanOrEqualReturns true if the value of argument 1 is greater than or equal to argument 2. Otherwise, returns false.
LessThanReturns true if the value of argument 1 is less than argument 2. Otherwise, returns false.
LessThanOrEqualReturns true if the value of argument 1 is less than or equal to argument 2. Otherwise, returns false.
AndReturns true if both values are true. Otherwise, returns false.
OrReturns true if either value is true. Otherwise, returns false.
ConditionReturns the value of argument 2 if the value of argument 1 is true. Otherwise, returns the value of argument 3.
MinReturns the smaller of two values.
MaxReturns the larger of two values.
ClampReturns argument 1 clamped within the range of argument 2 and argument 3.
LengthReturns the length of the vector in the argument.
SqrtReturns the square root of the argument.
DotReturns the dot product of two vectors.
CrossReturns the cross product of two three-dimensional vectors.
RotateIf argument 1 is a number, returns the result of rotating the two-dimensional vector in argument 2 counterclockwise by the angle (in degrees) of argument 1. If argument 1 is a Vector3, it applies the rotation represented by argument 1 as Euler angles (in degrees) to the three-dimensional vector in argument 2.

Types of arguments that can be set in logic

Argument TypeDescription
ConstantSet when using a constant, specifying its type and value.
RoomStateSet when using a message, specifying its type, target, and identifier. When using the Double type, all value types can be read commonly.

For more details on message types and values, see the common settings section of Trigger.

  1. Swap with the step above
  2. Delete the step
  3. Swap with the step below