Results 1 to 4 of 4

Thread: Complicated keydown question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    9

    Complicated keydown question

    Hey, I'm making and RPG for my programming class(I'm in highschool) and I have come across a problem. When you press a key to start walking right, I want it to start walking at full speed, but instead, it moves one space, then pauses, then starts moving at full speed. Does any one know how to fix this prob?
    If you do, please respond.

    Danke.

    --gu1d0m4n

  2. #2
    Zaei
    Guest
    Post your keydown code, and any relevent code.

    Z.

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    What you need to do is use the GetAsyncKeyState API instead of the internal KeyDown event that VB gives you. Do this in a Do... Loop basis and it will work out fine. If you're using a Timer already to do your movement, then put it in that and you're all set. KeyDown has its own quirks...

    You can find out about GetAsyncKeyState at http://www.allapi.net/ and maybe by a search here at VBForums.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    9
    thank you.

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