Flip Flop
![flip flop](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/flip_flop-a20d75197105d7beaf1715a2f1196ac4.png)
Use Flip-Flop to switch between two execution outputs. When this node is triggered for the first time, output A is executed. When it is triggered for the second time, output B is executed. For the third time, output A, and so on. Flip-Flop is in the Control category.
Input
Name | Data Type | Description |
---|---|---|
Enter | Exec | The input execution that triggers this node. |
Output
Name | Data Type | Description |
---|---|---|
A | Exec | Execute the next node when Is A is true. |
A | Exec | Execute the next node when Is A is false. |
Is A | Boolean | The condition that is flipped every time this node is triggered. |
Example
![flip flop example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/flip_flop_example-f20e358472fd4ea719476a576e24c7d3.gif)
This example uses the Flip Flop node to toggle the color of the cube in the center of the screen every time the user opens their mouth.
![flip flop node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/flip_flop_node-ce4664d31e1df3600ae4403e381cb64b.png)