What you may not know about logical expressions

9
  • 23 favourites

Index

Stats

4,820 visits, 7,644 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

You can also use this like an ordinary system condition, using "Compare two conditions".

I think its more usefull, becase sometimes you cant use AND and OR conditions in a single condition block. Here is what I'm talking about:

Couple examples:

    ((Sprite.Angle > 0) & (Sprite.var1 <> 0)) | (Sprite.Var2 <>0) ? 1 : 0


There is two cases:

1. Sprite.Angle > 0 and Sprite.var1 <> 0

2. Sprite.Var2 <> 0

If any on this cases are true, it will return 1.

    ((Sprite.Var1 > 0) | (Sprite.Var2 > 0) | (Sprite.Var3 > 0)) & Sprite.Var4 = 0 ? "true" : "false"

If you got this one, then you got the idea, if not, then you should re-read this tutorial again! :)

I hope this text helped you to learn something new.

Thanks!

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!