function playerAdvance()
{
c_move(me, move_vec, vector(0, 0, my.GRAVITY_VAR),
| IGNORE_PASSABLE | GLIDE);
// testing beeping means contact
if (HIT_TARGET)
{
if (you == villain)
beep();
}
}
action player_function()
{
...
player = me;
...
my.eflags |= FAT | NARROW;
// c_setminmax(me); // set my bounding box to my real size
// Don't need both, use one or the other
...
...
while (player_health > 0)
{
...
playerAdvance();
...
wait(1);
}
...
}
action villain_action()
{
villain = me;
wait(1);
...
...
my.eflags |= FAT | NARROW;
//// ARE The Values correct
// set bounding box to individual values
vec_set(villain.min_x,vector(30,20,80));
vec_set(villain.max_x,vector(-20,-20,0));
...
...
while (my.status != villain_dead)
{
...
wait(1);
}
...
}
void createVillain()
{
villain = ent_create("villain.mdl",
vector(-64,146,-111), villain_action );
...
// Don't set a value on the object, outside the object.
// Villains action should control the BBOX - just good object-based thinking
}