Quote:


Yes, max_enemy_count is a local var.





And where did you define it INSIDE the action? I cannot see it (must be blind ).

Code:

action enemy_creator
{
my.passable = on;
my.invisible = on;
while(1)
{
if(enemy_count < max_enemy_count) //max_enemy_count = 5
{
ent_create("speeder.mdl",my.x,enemy_flight);
enemy_count += 1;
}
wait(5);
}
}