Jump to content

IF Statements


Recommended Posts

So I have been working in a few mods using scripts and there are several cases in which I find repetitions in the script that could be solved with "and" or "or" in the IF statements I use. In other script languages I can just write down things like "IF ( State == 0 || State == 10 )" and be done with it but this doesn't seem to work with Morrowind.

I want to know if it is impossible or if the syntax is just different for Morrowind scripting, I can just keep doing it like I have been doing but it feels dumb to read the same thing over and over just because I can't use "and" or "or" in the statements.

Link to comment
Share on other sites

  • 4 weeks later...

Unfortunately, there is no "and" or "or" function in vanilla morrowind construction set. There might be in script extenders, but I cannot say.

 

You might already be doing this, but "and" can be accomplished with:

If ( x == 1 )
    If ( y == 1 )
        Do something
    Endif
Endif  

And "or" can be accomplished with:

If ( x == 1 )
    Do something
Endif

If ( y == 1 )
    Do something
Endif
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...