I have tried myself at using Expressions for quickly throwing together some simple functionality right in the editor, without opening the script editor. I just export an array of Strings. But apparently assignment is not allowed in these expressions! Method calls are fine, but assignment doesn’t seem to be okay. Here is what this looks like:

The method calls actually work perfectly fine here, but the assignments (with = in the line) do not seem to work. It seems to complain about there missing another = even though it is already there. Does someone have an idea on why this might happen?

  • Smorty [she/her]OP
    link
    fedilink
    52 months ago

    Oh yeah, that makes sense. In the documentation the only actual example they give for expressions is a math equasion, so I guess the code-executing features just came naturally… So I guess I will have to write methods for everything now…

    • @Maddier1993
      link
      12 months ago

      Or maybe try to have your methods as a left side… example: Expression: print(<your assignment>)

      • Smorty [she/her]OP
        link
        fedilink
        12 months ago

        This I dotn exactly understand. Do you mean it like this

        print(Input.mouse_mode = Input.MOUSE_MODE_CAPTURED)