Quote:

local/global or both kind of "variables" ????


Neither really. They are similar to local variables, but there is a slight difference. A local variable is scoped to a function and a skill is scoped to an entity. So if you have a local variable in the action of an entity, you can't use it in another function. But a skill can be used in an outside function, provided that the pointer is not invalid.

I guess it would be more accurate to say that skills are members of an entity.


Quote:
Could someone list the properties of flags please. I know they are boolean but I still get confused by them.


Flags are a bit weird now, but with the macros they aren't too difficult.

flags are defined in the same manner as skills:

Code:
//pulled out of my game's code
#define stealG FLAG1			//if this flag is set, the player must take care that no one sees her take the coins.
#define doorState FLAG2		//open and closed.
#define AWARE FLAG2			//AI state, AWARE means the AI knows Suzetta is around AND is actively trying to get to her, but not necessarily in combat
#define COMBAT FLAG3			//AI and player state, COMBAT means that Suzetta and an AI are currently fighting


Flags are set in game in this method:


entity.flags |= (AWARE | COMBAT); //set the combat and aware flags on
entity.flags &= (AWARE | COMBAT); //set the combat and aware flag off

Alternatively, there are the macros, which are more intuitive in my opinion:

set(obj,flag); //sets an objects flag (can be an entity, panel, anything that uses flags)
reset(obj,flag); //turns off all listed flags
toggle(obj,flag); //toggles all listed flags

note that if you use multiple flags in these macros, they are separated by an OR symbol "|"

Using flags in conditionals:

if(my.flags & AWARE) { //do stuff }

Or use the is(obj,flag) macro:

if(is(my,AWARE) { //go find the player and kill him }

There are also several types of flags:
emask is for enable_event flags
eflags is for material effects I believe
flags is your general purpose, 32 max, flags
and not sure what flags2 or smasks is.

C-Script flags were more intuitive IMO, but what can ya do?


I was once Anonymous_Alcoholic.

Code Breakpoint;