Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 Im trying to get the paperdoll system to blt a different image depending on the sexI want to do this (psuedo code)If [player.sex = male]Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll, Anim, spritetop)elseIf [player.sex = female]Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdollf, Anim, spritetop)what goes in the [] or do i need to send the sex from the server to do this? Link to comment Share on other sites More sharing options...
Antisora Posted June 27, 2011 Share Posted June 27, 2011 I do not know Link to comment Share on other sites More sharing options...
Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 thanks for looking anyway, one work around i think might work would be (since all my classes use the same sprite except for gender)would be this:If sprite = 0{they are male}elseif sprite = 1{they are female} Link to comment Share on other sites More sharing options...
Yxxe Posted June 27, 2011 Share Posted June 27, 2011 ```If Player(Index).Sex = SEX_MALE Then Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll, Anim, spritetop)ElseIf Player(Index).Sex = SEX_FEMALE Then Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll, Anim, spritetop)End If```@Antisora:> I do not knowCongrats on being no help whatsoever. Link to comment Share on other sites More sharing options...
Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 Thanks alot lightning, im gonna try and get it so it adds one to the paperdoll value now if they are female and then go from there Link to comment Share on other sites More sharing options...
Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 gave me an error to do with method or data member not found, highlighting the sex… this might be a problem on my side though Link to comment Share on other sites More sharing options...
Yxxe Posted June 27, 2011 Share Posted June 27, 2011 @Fragment:> gave me an error to do with method or data member not found, highlighting the sex… this might be a problem on my side thoughMake sure this is in modConstants:```Public Const SEX_MALE As Byte = 0Public Const SEX_FEMALE As Byte = 1``` Link to comment Share on other sites More sharing options...
Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 That was in my modconstant, i still get the error. Link to comment Share on other sites More sharing options...
Yxxe Posted June 27, 2011 Share Posted June 27, 2011 @Fragment:> That was in my modconstant, i still get the error.Oh, I see now, "Sex as Byte" isn't sent to the client usually. (Seeing as it isn't really needed at all.) Just make sure you send it to everyone online when the player logs in. Remember to add "Sex As Byte" to the PlayerRec UDT. (Client-side) Link to comment Share on other sites More sharing options...
Fragment Posted June 27, 2011 Author Share Posted June 27, 2011 Ok thanks, however, i have now found a work around… it relies on the fact that the players sprite is gender based and not class based though and it means that every paperdoll MUST have 2 images.However, this essentially allows gender based paperdoll (or atleast sprite based): If Sprite = 1 Then Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll, Anim, spritetop) ElseIf Sprite = 2 Then Call BltPaperdoll(x, y, Item(GetPlayerEquipment(Index, PaperdollOrder(i))).Paperdoll + 1, Anim, spritetop) End IfI am going to post this in tutorials for everyone else who has been looking for this, hopfully someone will help improve this by explaining how to allow the user to set it in the item editor. 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