License from €75
DE EN FR ES IT CZ

If ... and ... if ...?

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 10 years ago
    I have a question, that seems to be easy to answer, but after a lot of tries I just cannot make it.
    Here is the problem:
    I have a lot of different values and want to check, if all of them are true at the same time. If not, something else should happen. Do i really have to write:
    if value1 = x 
        if value 2= y
       else do something else
            if value3=z
               else do something else 
        (and so on ...)

    or is there something to combine values like: if value1=x and value2=y and value3=z then ...

    As you might have guessed, I am more of a writer than a programmer, but I have a lot of fun using visionaire to tell stories and appreciate the help in the forum a lot.

    constantin


  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 10 years ago
    if you are using only action parts then the answer would be yes. 
    But you could use Lua script to combine it like you guessed:

    Execute script :

    if Values["valuename"].Int == 12 and Values["valuename2"].Int == 32 and ... then
     Conditions["alltrue"].ConditionValur = true
    end

    (the value names have to be unique here) 

    and after that actionpart you could just check the "alltrue" condition actionpart if it is true... 
  4. · 10 years ago
    great! thank you!
  5. · 10 years ago
    You can combine two conditions in the editor too, but it's more helpful to use Lua. wink
  6. · 10 years ago
    You can combine two conditions in the editor too, but it's more helpful to use Lua. wink

    actually you can only compare two values if they are equal/higher/lower/etc than but not check if two of them are a specific number.
    For condtitions you can only check if it is true or false.
  7. · 10 years ago
    Ah, correct. 

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?