Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Creating the bullets
- maxbull = 100
- Dim bullet(maxbull)
- For i=0 To maxbull
- bullet(i)=LoadMesh ("bullet.3ds")
- EntityColor bullet(i), 100,100,100
- EntityType bullet(i), type_bullet
- Next
- ;---------MainProgram--------------------------------------------------------
- ;Firing bullets
- If KeyHit (SPACE_BAR) And reload = 0
- PlaySound phaser
- PositionEntity bullet(t) ,EntityX(gun,1),EntityY(gun,1),EntityZ(gun,1)
- RotateEntity bullet(t),EntityPitch#(gun,1)-35,EntityYaw#(gun,1),EntityRoll#(gun,1)
- EntityColor bullet(t),0,0,255
- t=t+1
- EndIf
- For q = 0 To maxbull
- MoveEntity bullet(q), 0,0.8,3
- If CountCollisions (bullet(q))
- crash=CollisionEntity (bullet(q),1)
- HideEntity crash
- score#=score#+1
- PlaySound explosion
- EndIf
- Next
- bulletcount=100-t
- If t=100 Then
- reload=1
- EndIf
- If KeyDown (R_KEY) = True Then
- t=0
- reload=0
- EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement