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

[EO] Paperdoll extra


Domino_
 Share

Recommended Posts

Intro: When your equiping a helmet on your character sprite all the hair is behind the helmet paperdoll and that looks bad isnt it? This might help, You need simple may say template of character, and set in paperdoll folder 1.bmp as his hair. And in client side it will check if player have helmet the hair will disapear and will show helmet paperdoll so you dont need to worry about hair in back of helmet.
Code is very simple.

**Client Side**
In **modDirectDraw7** _Public Sub BltPlayer_ Before error handler add:

```
            If GetPlayerClass(Index) = 1 Then ' Get player class [ Warrior ]
                If GetPlayerSprite(Index) = 1 Then ' Get player sprite male [ 1]
                    Call BltPaperdoll(x, Y, 1, Anim, spritetop) ' Paperdoll [ 1 ]
                Else
                If GetPlayerSprite(Index) = 2 Then ' Get player sprite female [ 2 ]
                    Call BltPaperdoll(x, Y, 2, Anim, spritetop) ' Paperdoll [ 2 ]
                End If
                End If
            End If

```Thats it, Im using this in my game also you can make for more classes and character sprites. :)
If its not hard for you add credits. ^^ xD
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
Why not use ElseIf?

```
            If GetPlayerClass(Index) = 1 Then ' Get player class [ Warrior ]
                If GetPlayerSprite(Index) = 1 Then ' Get player sprite male [ 1]
                    Call BltPaperdoll(x, Y, 1, Anim, spritetop) ' Paperdoll [ 1 ]
                ElseIf GetPlayerSprite(Index) = 2 Then ' Get player sprite female [ 2 ]
                    Call BltPaperdoll(x, Y, 2, Anim, spritetop) ' Paperdoll [ 2 ]
                End If
            End If

```
or better yet, Select Case:

```
Select Case GetPlayerClass(Index)
Case 1 ' Get player class [ Warrior ]
If GetPlayerSprite(Index) = 1 Then Call BltPaperdoll(x, Y, 1, Anim, spritetop) ' Paperdoll [ 1 ]
Case 2 ' Get player sprite female [ 2 ]
If GetPlayerSprite(Index) = 2 Then Call BltPaperdoll(x, Y, 2, Anim, spritetop) ' Paperdoll [ 2 ]
End Select

```
Link to comment
Share on other sites

@Soul:

> Why not use ElseIf?

I was writing this fastly to dont forget and havent touched, yes there is ways to do easyer and better but I havent toughed that. Also thanks for converting code to cases and elseif :)

p.s. in cases dont need end if?
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...