Code: Select all
If KeyArray(32) = True Then 'Spacebar Shoot
Call MAKE_FIREBALL(0)
End If[attachment=3607]shipwars.jpg[/attachment]
Moderators: Moderator, Global Moderator
Code: Select all
If KeyArray(32) = True Then 'Spacebar Shoot
Call MAKE_FIREBALL(0)
End If
They also offer downloadable VB games with source code.Programming Games for Beginners - VB 6.0
Have you ever wanted to create your own game, but found it hard to learn how? This book teaches you the basic skills needed to program Visual Basic Games. The basic concepts and techniques behind creating your own Visual Basic Games can be easily learned by anyone with a little programming know-how. Price: Free!

Code: Select all
Private Sub tmrArray_Timer()
Dim NUM As Integer
'ARROW KEYS
If PLAYER1_EXIST Then
If KeyArray(39) = True Then
SHIP(0).X = SHIP(0).X + 25
End If
If KeyArray(37) = True Then
SHIP(0).X = SHIP(0).X - 25
End If
If KeyArray(38) = True Then
SHIP(0).Y = SHIP(0).Y - 25
End If
If KeyArray(40) = True Then
SHIP(0).Y = SHIP(0).Y + 25
End If
If KeyArray(32) = True Then 'Spacebar Shoot [This bit lets the user use the spacebar to shoot fireballs.]
Call MAKE_FIREBALL(0)
End If
End If
End If
Code: Select all
If KeyArray(32) = True Then 'Spacebar Shoot [This bit lets the user use the spacebar to shoot fireballs.]
Call MAKE_FIREBALL(0)
End If




Code: Select all
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then
Call MAKE_FIREBALL(0)
End If
End Sub
