• I would like to compare a set of variables with a condition, each one in a specific scene.

    Here's my setup:

    set(var_root2,0);

    Second scene:
    txtadd(destination,var_root,get(whichscene));
    if(destination == 0, showlog();trace('headbang',);set(destination,1););

    This seems not to work.
    But i can trace both the value and name of the variable before the condition.
    I think I'm using bad syntax here. Again.

    Thank you,
    Tom

  • txtadd just adds two texts together. this means, in your case "destination" would be "var_root" + "value of 'whichscene' variable" (e.g. destination would be "var_root2" if "whichscene" equals "2"). So "destination" is never == 0, that's why condition never works.

    That's what I can understand from your explanation, at least.

    Regards,

    Alexey

  • I thought i can use it in a condition as trace('',destination) and trace('',get(destination)) gave the variable name, and the value that i am looking for.

    I realized, that i have overcomplicated things, just as i tried to simplify an overbrutal nest. *smile*
    I think i can use a universal variable for all scenes with a value of 1,2,3,4,5... and get that value for the condition instead of different variables for each scene with value 1 or 0.

    I will rethink my question and if i see any logical purpose i will put it in another way. If not, i will delete this topic.

    Anyway.
    Thank you,
    Tom

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!