Page 1 of 1

the 'if' function

PostPosted: Tue Jul 25, 2006 8:09 pm
by nappie
i know how to use this one from my short flash experience ^^
but how do you use it precisely in GE?

will anyone give me a short briefing? tx in advnce

PostPosted: Wed Jul 26, 2006 7:05 am
by Fuzzy
I'm the wrong guy to ask... ;)

PostPosted: Wed Jul 26, 2006 7:55 am
by DilloDude

PostPosted: Wed Jul 26, 2006 2:02 pm
by nappie
ty :)

and how do you set a condition?

PostPosted: Wed Jul 26, 2006 11:10 pm
by DilloDude
you can use ==(equal), != (not equal), > (greater than), < (less than), >= (greater than or equal to), <= (less than or equal to) as well as && (and), || (or). Then add you statements. So you could have:
Code: Select all
if (variable1 >= variable2 && (variable3 == variable4 || variable3 <= variable5))

If you don't use anything to compare with, it will be not equal to zero:
Code: Select all
if (variable)