Gun Accuracy

Blitz3D Forums/Blitz3D Beginners Area/Gun Accuracy

        If gun=1
	If ammo >= 1
	If MouseHit(1)
		PlaySound shoot
		ammo = ammo - 1
		CameraPick(camera, 400, 300)
		p.hole = New hole
		p\entityhandle = CopyEntity(bullethole)
		p\alpha = 0.9
		p\typething = "pistol"
		PositionEntity p\entityhandle, PickedX(), PickedY(), PickedZ()
		CreateSomeParticles(PickedX(), PickedY(), PickedZ(), 100, 100, 100, 6)
	EndIf
	EndIf
	EndIf


Where "bullethole" is the sprite of the bullethole.