|
-
Jul 6th, 2000, 10:15 AM
#1
Thread Starter
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|