Page 1 of 1

boolean variables

PostPosted: Sat Jan 14, 2012 6:27 pm
by Fojam
will boolean variables ever be implimented in game editor? at the moment i just use integers and make 1 true and 0 false, but it would be helpful if booleans were implimented, because they are a little more efficient for switching between two things.

Re: boolean variables

PostPosted: Wed Feb 01, 2012 5:26 pm
by Troodon
How can it be more handy to type "false" than "0"? :)
Int allows you to take, let's say -1 and 2 as variable values too if you realise the basic on/off variable isn't enough at some part.

If (machine == -2) //off, broken and burning
{
...
}

is faster than

if (machineWorks && machineOff && machineBurns)
{
...
}