tonyp
Jul 6th, 2000, 10:15 AM
im making a rpg or trying to make but i don't know
how to stop the character to stop moving when hes walking on a tree.
the background is image1 jpg and the character is image2 and the tree is image3.
the code is:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then Image2.Top = Image2.Top - 200
If KeyCode = vbKeyDown Then Image2.Top = Image2.Top + 200
If KeyCode = vbKeyLeft Then Image2.Move Image2.Left - 200
If KeyCode = vbKeyRight Then Image2.Move Image2.Left + 200
End Sub
how to stop the character to stop moving when hes walking on a tree.
the background is image1 jpg and the character is image2 and the tree is image3.
the code is:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then Image2.Top = Image2.Top - 200
If KeyCode = vbKeyDown Then Image2.Top = Image2.Top + 200
If KeyCode = vbKeyLeft Then Image2.Move Image2.Left - 200
If KeyCode = vbKeyRight Then Image2.Move Image2.Left + 200
End Sub