Questions

  • #1, by zurikTuesday, 19. March 2019, 09:05 5 years ago
    Just a couple of easy questions. I am new to VS and I wonder:

    1) How can I use "or" in the action parts. For example If  value1 == 1 or value2 == 2. 

    2) When I need to use "and" I just put two "if" after each other, but is there a better way? 

    3) How can I make a background speech for the characters. The things characters say while the game is on, without interacting with those characters.

    Thank you.

    Newbie

    40 Posts


  • #2, by sebastianWednesday, 20. March 2019, 00:18 5 years ago
    Just a couple of easy questions. I am new to VS and I wonder:

    1) How can I use "or" in the action parts. For example If  value1 == 1 or value2 == 2. 

    2) When I need to use "and" I just put two "if" after each other, but is there a better way? 

    3) How can I make a background speech for the characters. The things characters say while the game is on, without interacting with those characters.

    Thank you.
    Hi Zurik,

    there is no rea action part "if" which has an implemented "or". The easies thing you could do is using the "if lua" action part and define a Lua based return value in it like

    if Lua: "return Values["valuename1"].Int or Values["valuename2"].Int"

    ----
    yes, using two ands would be putting an if inside an if. However the answer to question 1 would do also the trick in one If-query:

    Example (more complex to show what would be possible):

    if Lua: "return (Conditions["conditionname1"].Value or Conditions["conditionname2"].Value) and Values["valuename1"].String == "henry" "

    ---

    background speech is as easy as normal character text. Just tick the checkbox inside that action part to make it background talking (controlling of character still possible)

    Best regards
    Sebastian


    Thread Captain

    2346 Posts