Results 1 to 5 of 5

Thread: [RESOLVED] Moving the pacman from 1 side of form to another

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Resolved [RESOLVED] Moving the pacman from 1 side of form to another

    i'm using Visual Basic 6... i'm trying build the Pacman game... but in a moviment theres a problem i can't find the answer.....
    when i move the pacman to out of form(left side and others, but i only code for these one) the pacman must show in other side of form, but he only hiddes... i don't know why... can any one help me?
    i need for left, right, up and down... or at least these line......
    heres the line:

    Code:
    If frmNivel.sprPlayer.Left < 0 Then frmNivel.sprPlayer.Left = frmNivel.Width - frmNivel.sprPlayer.Width - Speed
    thanks

  2. #2
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Moving the pacman from 1 side of form to another

    I can't see anything wrong with that line itself... What do you mean by "he only hides"? Does he just disappear as soon as he goes off the edge of the screen and not come back?

    metal

  3. #3
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: Moving the pacman from 1 side of form to another

    I can, I think...
    Width should be ScaleWidth or better still stored in a variable like GameWidth

  4. #4

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,904

    Re: Moving the pacman from 1 side of form to another

    Quote Originally Posted by Milk
    I can, I think...
    Width should be ScaleWidth or better still stored in a variable like GameWidth
    yes milk... you have right... thank you both... now is working.... thanks

  5. #5
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Moving the pacman from 1 side of form to another

    Ah right, yeah. I forgot about that. Stupid twips.

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