Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

NewCharacter Form


Flaw
 Share

Recommended Posts

Okay so I made a custom GUI for the NewCharacter form.. And I can't get the sprite thing to show up correctly. It was fine at first, then I tried to move all the sprite things down, and now it doesnt show up.. Soo I have no idea how to fix that =p

Here's an s/s of what happens in the client:
http://img690.imageshack.us/img690/4854/errorlm.jpg

Here's my project in vb:
http://img22.imageshack.us/img22/9936/projecterror.jpg

Please help, this is a big setback =p
Link to comment
Share on other sites

If you haven't made any changes to the code, make sure your code for the **Private Sub Timer1_Timer()** is as follows:

```
Private Sub Timer1_Timer()

    If cmbClass.ListIndex < 0 Then
        Exit Sub
    End If
    If 0 + CustomPlayers = 0 Then
        If SpriteSize = 1 Then
            If optMale.Value = True Then
                frmNewChar.Picsprites.Left = (animi * PIC_X) * -1
                frmNewChar.Picsprites.Top = (Int(Class(cmbClass.ListIndex).MaleSprite) * 64) * -1
                Call BitBlt(Picpic.hDC, 0, 0, PIC_X, 64, Picsprites.hDC, animi * PIC_X, Int(Class(cmbClass.ListIndex).MaleSprite) * 64, SRCCOPY)
            Else
                frmNewChar.Picsprites.Left = (animi * PIC_X) * -1
                frmNewChar.Picsprites.Top = (Int(Class(cmbClass.ListIndex).FemaleSprite) * 64) * -1
                Call BitBlt(Picpic.hDC, 0, 0, PIC_X, 64, Picsprites.hDC, animi * PIC_X, Int(Class(cmbClass.ListIndex).FemaleSprite) * 64, SRCCOPY)
            End If
        Else
            If optMale.Value = True Then
                frmNewChar.Picsprites.Left = (animi * PIC_X) * -1
                frmNewChar.Picsprites.Top = (Int(Class(cmbClass.ListIndex).MaleSprite) * PIC_Y) * -1

                Call BitBlt(Picpic.hDC, 0, 0, PIC_X, PIC_Y, Picsprites.hDC, animi * PIC_X, Int(Class(cmbClass.ListIndex).MaleSprite) * PIC_Y, SRCCOPY)
            Else
                frmNewChar.Picsprites.Left = (animi * PIC_X) * -1
                frmNewChar.Picsprites.Top = (Int(Class(cmbClass.ListIndex).FemaleSprite) * PIC_Y) * -1
                Call BitBlt(Picpic.hDC, 0, 0, PIC_X, PIC_Y, Picsprites.hDC, animi * PIC_X, Int(Class(cmbClass.ListIndex).FemaleSprite) * PIC_Y, SRCCOPY)
            End If
        End If
    End If

End Sub
```
That's the only thing I can think of that may cause the problem.
Link to comment
Share on other sites

Make sure you have this in the code for the form:

```
Private Sub Form_Load()
    Dim i As Integer
    Dim Ending As String

    For i = 1 To 3
        If i = 1 Then
            Ending = ".gif"
        End If
        If i = 2 Then
            Ending = ".jpg"
        End If
        If i = 3 Then
            Ending = ".png"
        End If

        If FileExists("GUI\NewCharacter" & Ending) Then
            frmNewChar.Picture = LoadPicture(App.Path & "\GUI\NewCharacter" & Ending)
        End If
    Next i

    If CustomPlayers = 1 Then
        If FileExists("GFX\Sprites.bmp") Then
            Picsprites.Picture = LoadPicture(App.Path & "\GFX\Sprites.bmp")
        Else
            Call MsgBox("Error: Could not find Sprites.bmp.")
            End
        End If
    End If

End Sub
```
If that doesn't work, then check to see if your **picSprites** PictureBox is anywhere near where the player sprites are supposed to show up.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...