Nov 25th, 2001, 04:24 AM
#1
Thread Starter
PowerPoster
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
Nov 25th, 2001, 05:59 AM
#2
-= B u g S l a y e r =-
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 ....
Nov 25th, 2001, 09:59 AM
#3
Good Ol' Platypus
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)
Nov 25th, 2001, 10:00 AM
#4
Good Ol' Platypus
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:
Private Sub MoveCharacter()
If SpeedCount Mod 3 = 0 Then
'move the character
If Key(vbKeyUp) = True Then
'move the character up on plain grass
Key(vbKeyUp) = False
If MapArray(uCharacter.x, uCharacter.y - 1) = "G" Then
uCharacter.y = uCharacter.y - 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
Exit Sub
End If
'move the character up and fight monster
If MapArray(uCharacter.x, uCharacter.y - 1) = "M" Then
uCharacter.y = uCharacter.y - 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
End If
End If
If Key(vbKeyDown) = True Then
'move the character down on plain grass
Key(vbKeyDown) = False
If MapArray(uCharacter.x, uCharacter.y + 1) = "G" Then
uCharacter.y = uCharacter.y + 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
Exit Sub
End If
'move the character down and fight monster
If MapArray(uCharacter.x, uCharacter.y + 1) = "M" Then
uCharacter.y = uCharacter.y + 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
Key(vbKeyDown) = False
picFight.ZOrder 0
picFight.Visible = True
picFight.SetFocus
FightInit
End If
End If
If Key(vbKeyLeft) = True Then
'move the character left on plain grass
Key(vbKeyLeft) = False
If MapArray(uCharacter.x - 1, uCharacter.y) = "G" Then
uCharacter.x = uCharacter.x - 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
Exit Sub
End If
'move the character left and fight monster
If MapArray(uCharacter.x - 1, uCharacter.y) = "M" Then
uCharacter.x = uCharacter.x - 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
End If
End If
If Key(vbKeyRight) = True Then
Key(vbKeyRight) = False
'move character right on plain grass
If MapArray(uCharacter.x + 1, uCharacter.y) = "G" Then
uCharacter.x = uCharacter.x + 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
Exit Sub
End If
'move the character right and fight monster
If MapArray(uCharacter.x + 1, uCharacter.y) = "M" Then
uCharacter.x = uCharacter.x + 1
BitBlt picGameArea.hDC, uCharacter.x * 32, uCharacter.y * 32, 32, 32, picCharacter.hDC, 0, 0, vbSrcCopy
picGameArea.Refresh
End If
End If
'show information sign
If Key(13) = True And MapArray(uCharacter.x, uCharacter.y - 1) = "S" Then
DoSign uCharacter.x, uCharacter.y - 1
picSign.ZOrder 0
picSign.Visible = True
picSign.SetFocus
Key(13) = False
End If
End If
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)
Nov 25th, 2001, 03:03 PM
#5
Thread Starter
PowerPoster
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 .
Nov 25th, 2001, 03:58 PM
#6
Good Ol' Platypus
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)
Nov 25th, 2001, 08:11 PM
#7
Thread Starter
PowerPoster
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.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width