@jcl: Wow, I had no idea about that. I just assumed all #defines were replaced with their appropriate values just before it gets compiled.
@Alan: In C (and Lite-C) you can put in your code (usually near the top with your #includes) a #define.
eg:
#define SCALESIZE 15
...
...
action scaledEnt() {
// scale all dimensions of the entity by a pre-determined constant
my.scale_x = my.scale_y = my.scale_z = SCALESIZE;
}
This is common practice to remove "magic numbers" (that is, constants in your code that may or may not need to change later on in production); this makes the code more readable (someone reading my code doesn't know why I'm scaling this entity by 15, but if they see it scaled by a #define they can usually see what purpose it is serving). It also means if you need to change that constant, and it is used a lot in your code, you can just change it in the #define.
It doesn't have to be a number, either. It's often used for skills:
#define HEALTH skill1
#define VITALITY skill1
...
...
my.HEALTH = 30;
my.VITALITY = 30; // redundant, since VITALITY and HEALTH both become "skill1"
You can have two different defines for the same skill or value (as I've just done), but you have to be sure one entity won't need them both to be different things (here HEALTH and VITALITY mean the same thing, but if an entity needs HEALTH and VITALITY to be different, one of them should be #defined to a different skill instead; this is just to show its flexibility).
Does anyone care to explain why it won't work for engine objects? That sounds weird to me, although I obviously don't know exactly how the compiler works.
Jibb