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!
Printable View
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!
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.