Node Copied to Clipboard!

The *Is Equal* is a binary operator that takes two arguments and compares whether they are equal or not (True or False). The resulting boolean will be passed through the bottom handle of this node.

Right-click on storyboard to add the *Is Equal* node under Operators.

Open at least two argument slots. Usually it is used to compare some variable value and a constant value of the same type. For example, you can compare the value of an integer variable with a constant integer or an object property against a boolean. You can compare more than two arguments as well.

*Is Equal* pairs well with *If* and *Branch* nodes. In This example the lesson will only animate and unhighlight the sphere only if the sphere was highlighted before. Therefore we won't be trying to unhighlight an object that was never highlighted to begin with.

Is Equal is often used to create arguments for the And and Or operators also discussed in this article.

As seen above we can use *Is Equal* to compare if values are equal to each other. To check if values are unequal we can use the *Is Not Equal* node.

This node can be used the same way as *Is Equal* but it returns True if the values are not equal and False if they are.

*Not* can be attached to the bottom of binary operators such as *Is Greater Than* or *Is Less Than* as well as the *And* and *Or* nodes to obtain the opposite return value to the one expected.

For Example using it with *Is Less Than* converts it to *Is Not Less Than*. Therefore if The *Is Less Than* node would have normally produced a False because the first argument was greater than the second then adding a *Not* would convert the False to a True and we can play an instance that counts on the variable being greater than and not less than.

In this example with nothing originally highlighted the sphere will highlight only if the variable named num is not less than 0 and highlight the box if it is less than 0.

You must provide at least two arguments with boolean results.

The example above uses two *Is Equal* Nodes as arguments. If both the red and white wires are visible then the lesson will play the True branch. If one or both of the wires is not visible then it will play the False branch.

Takes two arguments and returns True if the first argument is less than the second argument and False otherwise.

The example above will highlight the sphere if the variable num is less than 0 and highlight the box if it is greater than or equal to 0.

Takes two arguments and returns True if the first argument is greater than the second argument and False otherwise.

The example above will highlight the sphere if the variable num is greater than 0 and highlight the box if it is not.

This node works the same as the *Is Greater Than* node except it returns true if the first argument is greater than or equal to the second and False if it is less than it.

This node works the same as the *Is Less Than* node except it returns true if the first argument is less than or equal to the second and False if it is greater than it.

The Divide node will divide the first argument by the second argument. If there is more than two arguments it will take the result of the division and divide it by the next argument below.

In this example, it will do 10/2 = 5 and then 5/2 = 2. Note: because we are using the int type it will perform integer division (how many times 2 can fully go into 5) with no decimal places. If you use the float type you will get the expected decimal answer.

The Modulo operator gives the remainder of a division.

The Multiply node works as you would expect by multiplying all of its arguments together. It takes at least 2 arguments.

The Add node will add together all the arguments you give it. It takes at least 2 arguments.