In Lite-C flags are no longer treated as structure elements but bit flags.

The standard entity flags, like INVISIBLE, BRIGHT, and PASSABLE can be accessed by referencing the bits of the entity.flags variable. The entity event flags, like ENABLE_CLICK, ENABLE_ENTITY, and ENABLE_BLOCK can be accessed by referencing the bits of the entity.eflags variable.

There are macros built into Lite-C so you don't have to use OR and AND operators to access the bits of the entity.flags variable, and can instead use more simple commands like the following (red is c-script, green is lite-c):

Code:
my.invisible = on; // turns on flag
my.invisible = off; // turns off flag
if( my.invisible == on ) // returns 1 if flag is on
if( my.invisible == off ) // returns 1 if flag is off



Code:
set(my,INVISIBLE); // set flag on
reset(my,INVISIBLE); // set flag off
if( is(my,INVISIBLE) ) // returns 1 if flag is on
if( !is(my,INVISIBLE) ) // returns 1 if flag is off



Unfortunately for the event flags in entity.eflags no such macros exist, so you must access the bits yourself with boolean operators such as AND and OR. Here are some examples:

Code:
my.eflags |= ENABLE_CLICK; // set flag on
my.eflags &= ~ENABLE_CLICK; // set flag off
if( my.eflags & ENABLE_CLICK ) // returns 1 if flag is on
if( !(my.eflags & ENABLE_CLICK) ) // returns 1 if flag is off




Eats commas for breakfast.

Play Barony: Cursed Edition!