\\I have changed it mostly only to make it easier, I did not try it , but it could work
\\replace it with the old one
var maximum_ammo=180;
var myammo;
action ammo_pack
{

my.passable = on;
while (player == null) {wait (1);}

while(1)
{
my.pan+=3*time_step;
current_ammoreserve=myammo;
if(current_ammoreserve>maximum_ammo)
{current_ammoreserve-=(myammo -maximum_ammo;}

if (vec_dist(player.x,my.x)<50 && current_ammoreserve<180)
{
snd_play (gotammo_wav, 80, 0);
ent_remove (my);
current_ammoreserve += 18;
}
wait(1);
}
}



Last edited by Marwan; 09/14/07 22:41.