Results 1 to 2 of 2

Thread: Rpg help!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Posts
    20

    Post

    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!


  2. #2
    Lively Member Zero's Avatar
    Join Date
    Feb 2000
    Posts
    101

    Post

    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
  •  



Click Here to Expand Forum to Full Width