Swapping Title Blocks

Hey All,

I’m using Data-Shapes to ask the user to pick one of 6 options. I’ve got a working Code Block node that does the following:

  • If choice 1 is picked, output a 0
  • If choice 2 is picked, output a 1
  • If choice 3 is picked, output a 2
  • If choice 4 is picked, output a 3
  • If choice 5 is picked, output a 4
  • If choice 6 is picked, output a 5

Depending on the outputted number, I need to do nothing, swap 1 title block for another, or swap 3 title blocks for 3 others, as follows:

  • if choice 1 is picked, and the outputted value is 0, do nothing,
  • if choice 2 is picked, and the outputted value is 1, swap title block “G” for title block “H”,
  • if choice 3 is picked, and the outputted value is 2, swap title block “A” for title block “B”, swap title block “D” for “E”, and swap title block “G” for “I”,
  • if choice 4 is picked, and the outputted value is 3, swap title block “A” for title block “C”, swap title block “D” for “F”, and swap title block “G” for “J”,
  • if choice 5 is picked, and the outputted value is 4, swap title block “G” for title block “K”,
  • if choice 6 is picked, and the outputted value is 1, swap title block “G” for title block “L”,

As you can see, I’ve got the logic worked out. I’ve tried multiple different ways, but I end up having to add more and more nodes to deal with the various conditions (i.e. which choice was selected, and do I therefore do 1 swap or 3 swaps), and it gets so complex, that I can’t follow it.

Any assistance would be GREATLY appreciated!

Thanks,
Scott