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

[EO]Face instead of sprite on new char area


Growlith1223
 Share

Recommended Posts

Hello and welcome to my 3rd tutorial and this one is how to make the newcharactersprite sub load the face portrait instead!

First locate that sub(In directDraw7)

and change
```
    If frmMenu.optMale.Value = True Then
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite)
    Else
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite)
    End If

```into
```
    If frmMenu.optMale.Value = True Then
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite)
        frmMenu.picSprite.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & Sprite & ".bmp")
    Else
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite)
        frmMenu.picSprite.Picture = LoadPicture(App.Path & "\data files\graphics\faces\" & Sprite & ".bmp")
    End If

```This will make the picSprite load the face instead
Next, change
```
    width = DDSD_Character(Sprite).lWidth / 4
    height = DDSD_Character(Sprite).lHeight / 4

```into
```
    width = DDSD_Character(Sprite).lWidth
    height = DDSD_Character(Sprite).lHeight

```This will make sure that your face portrait won't get all messed up and distorted…

Change
```
Call Engine_BltToDC(DDS_Character(Sprite), sRECT, dRECT, frmMenu.picSprite)

```
to
```

    frmMenu.picSprite = LoadPicture(App.Path & "\data files\graphics\faces\" & Sprite & ".bmp")

```
and if this is used, it should look sometihing like:
![](http://www.freemmorpgmaker.com/files/imagehost/pics/17905e826d6da235bb9ef111ace938fa.JPG)

Bugs:
There are no bugs as i see…If there is, let me know and i will try to fix it right away
Link to comment
Share on other sites

@Dremek:

> Nice, this might be useful. Especially if you had the sprite and the face.

=D I got that to work before, I second this. It looks real nice to see  both the Sprite and the Face on the same screen.

Example:
![](http://www.freemmorpgmaker.com/files/imagehost/pics/1c9461c7c17335d97a2992057a04d68e.png)
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
@narut0no:

> Please Help…!!!

I had this problem too, what I did was left this line be
```
    If frmMenu.optMale.Value = True Then
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).MaleSprite(newCharSprite)
    Else
        Sprite = Class(frmMenu.cmbClass.ListIndex + 1).FemaleSprite(newCharSprite)
    End If
```
and changed this code instead

```
If DDS_Character(Sprite) Is Nothing Then
        Call InitDDSurf("characters\" & Sprite, DDSD_Character(Sprite), DDS_Character(Sprite))
    End If
```
to

```
If DDS_Character(Sprite) Is Nothing Then
        Call InitDDSurf("faces\" & Sprite, DDSD_Character(Sprite), DDS_Character(Sprite))
    End If
```
you still want to change the

```
    width = DDSD_Character(Sprite).lWidth / 4
    height = DDSD_Character(Sprite).lHeight / 4
```
to

```
    width = DDSD_Character(Sprite).lWidth
    height = DDSD_Character(Sprite).lHeight
```
hope this helps
Link to comment
Share on other sites

@narut0no:

> I am follow your tutorial And i get this when make a new character…
> ![](http://www.freemmorpgmaker.com/files/imagehost/pics/aa1a1775c0e9dcef85edcb3521bfb4f5.png)
> Please Help…!!!

The reason for that is…This tutorial is meant for the Face, not the character sprites....
Link to comment
Share on other sites

@Growlith1223:

> The reason for that is…This tutorial is meant for the Face, not the character sprites....

When your source is implemented it doesn't show faces, it only shows the FULL sprite picture, that is an error in the fixed code you put, I am not sure exactly what caused it as I am a bit new to VB6, but I had the same error he did and I followed your tutorial step by step
Link to comment
Share on other sites

lawl your way will cause a glitch in loading the sprite in the game xD

To fixthis, change
```
Call Engine_BltToDC(DDS_Character(Sprite), sRECT, dRECT, frmMenu.picSprite)

```
to
```

    frmMenu.picSprite = LoadPicture(App.Path & "\data files\graphics\faces\" & Sprite & ".bmp")

```
Link to comment
Share on other sites

@Growlith1223:

> lawl your way will cause a glitch in loading the sprite in the game xD
>
> To fixthis, change
> ```
> Call Engine_BltToDC(DDS_Character(Sprite), sRECT, dRECT, frmMenu.picSprite)
>
> ```to
> ```
>
>     frmMenu.picSprite = LoadPicture(App.Path & "\data files\graphics\faces\" & Sprite & ".bmp")
>
> ```

It hasn't messed it up yet.. I have made like 15 accounts and the sprite shows up fine when they enter the game. But I don't know that much about VB so I would go with whatever works right
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...