action npc()
{
var counter = 0;
var shooting_time = 20;//don't know the number that you need for 2 seconds
while(1)
{
counter += time_step;
if(counter > shooting_time)
{
create_bullet();
counter = 0;
}
wait(1);
}
}