bullet help

Blitz3D Forums/Blitz3D Beginners Area/bullet help

Valgar, I think that is only slightly better, this should do what you want:
If KeyHit(57) And hpistol = 1 And pistol\ammo > 0
b.bullet = New bullet

b\x = pistol\x

b\y = pistol\y

pistol\ammo = pistol\ammo - 1

If pistol\ammo <= 0
pistol\ammo = 0
EndIf
EndIf
For b.bullet = Each bullet
  b\x = b\x + 1
  DrawImage(ibullet,b\x,b\y)
Next