Or in condition

  • 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.

Oromis

Member
Feb 19, 2017
2
0
0
24
Good evening! I am in full development of a small skript but I find myself stuck in a condition :3
Indeed, I noticed that we could not use the "or" (or I use it badly: /) . Here is my condition:
Code:
if {testSiTeamMate2} is false or {testSiTeamMate1} is false:
What I want is even more precise than that, test if one or both of my variables are false, but I thought I would get away with a "or" then an "and" but no ... In short, 'A has an alternative, I am taker! :emoji_slight_smile:
Thank you in advance ! ^^
 
Skript doesn't support more than one condition at the same time, but there are way arounds, such as do this:
code_language.skript:
if {testSiTeamMate1} and {testSiTeamMate2} are false: #do stuff
you can do that because the comparison conditions support multiple objects, but if you want to do this:
code_language.skript:
if player is alive and player's gamemode is survival:
#do stuff
couldn't be possible IF you're using Skript only but with skQuery, you can use the lambdas and the check condition for do multiple conditions at the same time:
code_language.skript:
if check [player is alive]->[player's gamemode is survival]:
#do stuff
 
Status
Not open for further replies.