Results 1 to 7 of 7

Thread: My Senior Project

  1. #1

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125

    My Senior Project

    Here is what I have so far for my physical project. Comments are welcome, and suggestions are needed. I dunno what else to add...
    Attached Files Attached Files
    <removed by admin>

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    I get some err.

    Line 41: Property Picture in picFight had an invalid file reference.
    Line 82: Property Picture in picCharacter had an invalid file reference.
    Line 128: Property Picture in picTiles had an invalid file reference.
    Line 168: Property Picture in picSign had an invalid file reference.
    Line 41: Property Picture in picFight had an invalid file reference.
    Line 82: Property Picture in picCharacter had an invalid file reference.
    Line 128: Property Picture in picTiles had an invalid file reference.
    Line 168: Property Picture in picSign had an invalid file reference.

    frmMain.log file ....
    -= a peet post =-

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Just pop the pictures in where they should be (bigSign in Sign, Tiles in Tiles, etc...)
    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
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Here's a fixed MoveCharacter routine. Before, the character would move about 5-6 spaces until he stopped. This will make him only move one:
    VB Code:
    1. Private Sub MoveCharacter()
    2. If SpeedCount Mod 3 = 0 Then
    3. 'move the character
    4. If Key(vbKeyUp) = True Then
    5. 'move the character up on plain grass
    6. Key(vbKeyUp) = False
    7. If MapArray(uCharacter.x, uCharacter.y - 1) = "G" Then
    8.     uCharacter.y = uCharacter.y - 1
    9.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    10.     picGameArea.Refresh
    11.     Exit Sub
    12. End If
    13. 'move the character up and fight monster
    14. If MapArray(uCharacter.x, uCharacter.y - 1) = "M" Then
    15.     uCharacter.y = uCharacter.y - 1
    16.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    17.     picGameArea.Refresh
    18. End If
    19. End If
    20. If Key(vbKeyDown) = True Then
    21. 'move the character down on plain grass
    22. Key(vbKeyDown) = False
    23. If MapArray(uCharacter.x, uCharacter.y + 1) = "G" Then
    24.     uCharacter.y = uCharacter.y + 1
    25.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    26.     picGameArea.Refresh
    27.     Exit Sub
    28. End If
    29. 'move the character down and fight monster
    30. If MapArray(uCharacter.x, uCharacter.y + 1) = "M" Then
    31.     uCharacter.y = uCharacter.y + 1
    32.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    33.     picGameArea.Refresh
    34.     Key(vbKeyDown) = False
    35.     picFight.ZOrder 0
    36.     picFight.Visible = True
    37.     picFight.SetFocus
    38.     FightInit
    39. End If
    40. End If
    41. If Key(vbKeyLeft) = True Then
    42. 'move the character left on plain grass
    43. Key(vbKeyLeft) = False
    44. If MapArray(uCharacter.x - 1, uCharacter.y) = "G" Then
    45.     uCharacter.x = uCharacter.x - 1
    46.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    47.     picGameArea.Refresh
    48.     Exit Sub
    49. End If
    50. 'move the character left and fight monster
    51. If MapArray(uCharacter.x - 1, uCharacter.y) = "M" Then
    52.     uCharacter.x = uCharacter.x - 1
    53.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    54.     picGameArea.Refresh
    55. End If
    56. End If
    57. If Key(vbKeyRight) = True Then
    58. Key(vbKeyRight) = False
    59. 'move character right on plain grass
    60. If MapArray(uCharacter.x + 1, uCharacter.y) = "G" Then
    61.     uCharacter.x = uCharacter.x + 1
    62.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    63.     picGameArea.Refresh
    64.     Exit Sub
    65. End If
    66. 'move the character right and fight monster
    67. If MapArray(uCharacter.x + 1, uCharacter.y) = "M" Then
    68.     uCharacter.x = uCharacter.x + 1
    69.     BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
    70.     picGameArea.Refresh
    71. End If
    72. End If
    73.  
    74. 'show information sign
    75. If Key(13) = True And MapArray(uCharacter.x, uCharacter.y - 1) = "S" Then
    76.     DoSign uCharacter.x, uCharacter.y - 1
    77.     picSign.ZOrder 0
    78.     picSign.Visible = True
    79.     picSign.SetFocus
    80.     Key(13) = False
    81. End If
    82. End If
    83.  
    84. End Sub
    I made them false once they had been validated so they wouldn't be again.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Thanks Sastraxi. I knew I had to fix that, but I didn't think of that. I had the If SpeedCount Mod 3 = 0 going up in numbers to try to slow him down, but the way you mentioned works a lot better, and peet, do what sastraxi mentioned, put all the pictures back in their pictureboxes. I guess it got corrupted, or it lost the pictures along it's way across the big internet .
    <removed by admin>

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Your FRX was referring to pictures that weren't there, although I thought they were STORED in the FRXes. Go figure.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7

    Thread Starter
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Originally posted by Sastraxi
    Your FRX was referring to pictures that weren't there, although I thought they were STORED in the FRXes. Go figure.
    I thought that too. At least I read that somewhere. Oh well, that's why I included the images, just incase something like that happened.
    <removed by admin>

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