Last active
June 29, 2020 17:14
-
-
Save animoplex/c706d6df86674120e6e1e7d75c45d8ef to your computer and use it in GitHub Desktop.
If / Else Statements (Numbers) - After Effects Expression by Animoplex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If / Else Statements (Numbers) - Created by Animoplex: www.animoplex.com | |
// A collection of if/else statements using numbers. | |
// Variation A: Even Or Odd | |
// Determines if the input is an even or odd number, outputs based on the result. | |
num = effect("Slider Control")("Slider"); | |
if ((num % 2) == 0) { | |
100; | |
} else { | |
0; | |
} | |
// Variation B: If A Number Is Between Two Numbers | |
// Useful for setting conditions for numbers within a range. | |
num = effect("Slider Control")("Slider"); | |
min = 1; | |
max = 10; | |
if ((num >= min) && (num <= max)) { | |
100; | |
} else { | |
0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment