And/Or conditions

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
G

Goetheus

Hi everybody!

I would like to know if we can use "or" with conditions?

I know there are lambdas:
[condition 1]->[condition 2] = "condition 1 + condition 2"

But I don't know for "or".

Thank you for help!
Kiss <3
 
You can do this workaround:
code_language.skript:
if check [first condition] and check [second condition] are true and false or false and true:
Or simply this:
code_language.skript:
If [first condition] is true:
    #do stuff
    Stop
If [second condition] is true:
    #do same stuff
    Stop
so you have: if first or second condition is true: do something
 
  • Like
Reactions: Goetheus
Or simply this:
code_language.skript:
If [first condition] is true:
    #do stuff
    Stop
If [second condition] is true:
    #do same stuff
    Stop
so you have: if first or second condition is true: do something
That would be the same as do:
code_language.skript:
if check [first condition]->[second condition]:
I think what you meant this:
code_language.skript:
if first condition is true:
    if second condition is false:
        #do stuff
else:
    if condition is true:
        #do more stuff
But as you can see, it's easier to do in the way I did it.
 
  • Like
Reactions: Goetheus
Status
Not open for further replies.