for the original message, I see that you using the same book I did to learn how to program games. here is some simple code that I use to make bullets in all my games.
;Bullets for player 1
fullcart=100
Dim bullet(fullcart)
For i=0 To fullcart
bullet(i)=CreateSphere()
ScaleEntity bullet(i),0.10,0.10,0.10
EntityColor bullet(i),255,0,0
HideEntity bullet(i)
EntityType bullet(i),type_bullets1
EntityRadius bullet(i),0.2
Next
;player 1's bullets
If KeyHit(29) And t<100 Then
PositionEntity bullet(t) ,EntityX(gun1,1),EntityY(gun1,1),EntityZ(gun1,1)
ShowEntity bullet(t)
RotateEntity bullet(t) ,EntityPitch#(gun1,1),EntityYaw#(gun1,1),EntityRoll#(gun1,1)
t=t+1
EndIf
For e=0 To fullcart
MoveEntity bullet(e),0,1,0
Next
if using functions, you have to make sure that "t" is a global or it wont work.
hoped this helped.
;Bullets for player 1
fullcart=100
Dim bullet(fullcart)
For i=0 To fullcart
bullet(i)=CreateSphere()
ScaleEntity bullet(i),0.10,0.10,0.10
EntityColor bullet(i),255,0,0
HideEntity bullet(i)
EntityType bullet(i),type_bullets1
EntityRadius bullet(i),0.2
Next
;player 1's bullets
If KeyHit(29) And t<100 Then
PositionEntity bullet(t) ,EntityX(gun1,1),EntityY(gun1,1),EntityZ(gun1,1)
ShowEntity bullet(t)
RotateEntity bullet(t) ,EntityPitch#(gun1,1),EntityYaw#(gun1,1),EntityRoll#(gun1,1)
t=t+1
EndIf
For e=0 To fullcart
MoveEntity bullet(e),0,1,0
Next
if using functions, you have to make sure that "t" is a global or it wont work.
hoped this helped.