Visual Productions forum

Author Topic: If/else- Logic in Show-Control?  (Read 2324 times)

July 08, 2015, 01:16:37 PM
Read 2324 times

R-Neuke

  • Member
  • *
  • Posts: 7
Hi everyone,

i've never used the variables in the curecore.
Is there a way to program something like:

If( variable1 = 1 AND variable2 = 1  => do action1; else => do action2)

or much better:

case
(
var1 = 0 AND var2 =0 ; action1;
var1 = 1 AND var2 =0 ; action2;
var1 = 0 AND var2 = 1; action3;
var1 = 1 AND var2 = 1; action4
)
Greeting,

 your Cuefux

July 08, 2015, 02:32:44 PM
Reply #1

Boyd Nijsten

  • Member
  • *
  • Posts: 202
    • www,guusvandenakker.nl
If you want To use The GPI as source you can use The binary mode... This does exactly as you say...

July 09, 2015, 09:46:25 AM
Reply #2

Jurriën de Klerk

  • Visual Productions
  • Member
  • **
  • Posts: 94
Hello R. Neuke,

There is no way to implement real logic, but it is possible to build a workaround.

What you could do is use a third variable to 'calculate' an unique value using the increment and decrement functions. With this, you can achieve your case states, for example.

If var1=1 triggers a increment var 3 with 100 and decrement var3 with 100 when var1=0 and the same for var2 but with 50 instead of 100, then whenether var1 or var2 changes it will change var3 and set it to an unique value. Then if the actions are triggered  using the value of var3 you can build your case statement.
Let me know if it works.
Best regards,

Jurrien
« Last Edit: July 10, 2015, 10:40:37 AM by Julien Levaufre »
Jurriën de Klerk
Visual Productions BV

 

SMF spam blocked by CleanTalk