|
-
Feb 18th, 2000, 11:23 PM
#1
Thread Starter
Junior Member
i'm trying to make a rpg but the man you control walks over the trees and other things
and it can't move up.
Please help me!
-
Feb 19th, 2000, 01:11 AM
#2
Lively Member
Uhh... peachy. What are you using for this RPG? DirectX? BitBlt? Moving image controls? I could help you more if you could be a little more specific. As for your ghostly trees, try this crash detection routine:
' We assume that you know the X and Y
' coordinates of the crasher and the
' crashee. You also need to know the height
' and width of both.
Sub Form1_Keydown(Keycode as integer, Shift as integer, etc.)
If Crasher.X >= Crashee.X AND Crasher.X <= Crashee.X + Crashee.Width AND Crasher.Y >= Crashee.Y AND Crasher.Y <= Crashee.Y + Crashee.Height Then
'In here, put an Exit Sub or something to
'keep the man from moving.
End If
'Put your movement code here.
End Sub
Yes, I know it's a big long If statement, but it works. Also, you will have to re-run it for each object, possibly in a For loop.
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
|