Domino_ Posted March 12, 2012 Author Share Posted March 12, 2012 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 More sharing options...
Zopto Posted March 21, 2012 Share Posted March 21, 2012 niceeeeee Link to comment Share on other sites More sharing options...
or3o Posted April 4, 2012 Share Posted April 4, 2012 When I added this I get an end if without block if error, I know I am doing something wrong but any insight into what i need to do to get this to work would be helpful. Thanks in advance. Link to comment Share on other sites More sharing options...
RyokuHasu Posted April 4, 2012 Share Posted April 4, 2012 Domino_ Count your Ifs and End Ifs >.< Link to comment Share on other sites More sharing options...
Domino_ Posted April 4, 2012 Author Share Posted April 4, 2012 Sorry, fixed. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 4, 2012 Share Posted April 4, 2012 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 More sharing options...
Domino_ Posted April 4, 2012 Author Share Posted April 4, 2012 @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 More sharing options...
Ruins of Hell Posted April 4, 2012 Share Posted April 4, 2012 @Domino_:> p.s. in cases dont need end if?No, you do. But you can do:```If Then ```without an End If but the statement cannot be more than 1 line. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now