What you may not know about logical expressions

  • 16 favourites

Index

Stats

1,494 visits, 2,607 views

Translations

This tutorial hasn't been translated.

Tools

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!

  • 0 Comments

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