![]() |
Class Sprite for Male and Female - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13) +------ Thread: Class Sprite for Male and Female (/showthread.php?tid=2174) |
Class Sprite for Male and Female - JokeofWeek - 23-09-2008 Alright, so what this tutorial will basically do is let you choose a sprite for the male version of a class and the female version of a class! ![]() ![]() Go look for the following lines, in modTypes : Code: Type ClassRec and replace the Sprite as Integer with : Code: MSprite as Integer Now, in sub LoadClasses (modDatabase), look for the line : Code: Class(i).Sprite = Val(GetVar(FileName, "CLASS" & i, "Sprite")) and replace it with : Code: Class(i).MSprite = Val(GetVar(FileName, "CLASS" & i, "MSprite")) In sub SaveClasses (modDatabase), look for : Code: Call PutVar(FileName, "CLASS" & i, "Sprite", CStr(Class(i).Sprite)) and replace it with : Code: Call PutVar(FileName, "CLASS" & i, "MSprite", CStr(Class(i).MSprite)) So far so good ![]() ![]() Quote:Sprite=### to : Quote:MSprite=Male Sprite ###. Now, we have to make sure the code in the part where the player is actually assigned the proper sprite. This is done in sub AddChar. Now, MS already has a system like this, but the problem with it is it assigns the player the same sprite, whether the player chooses Male or Female. This is represented by these lines : Code: If Player(Index).Char(CharNum).Sex = SEX_MALE Then Just replace those lines with : Code: If Player(Index).Char(CharNum).Sex = SEX_MALE Then And there you go! You now have a female and male sprite for each class! ![]() Re: Class Sprite for Male and Female - timster0 - 23-01-2009 How would I make it so when you create a new char you select which sprite you want to be? Re: Class Sprite for Male and Female - Forte - 26-01-2009 timster0 Wrote:How would I make it so when you create a new char you select which sprite you want to be?There's a tutorial for that. Search for it Re: Class Sprite for Male and Female - Coke - 26-01-2009 timster0 Wrote:How would I make it so when you create a new char you select which sprite you want to be? The very last part of the tutorial tells you exactly how to do this. Read please. Re: Class Sprite for Male and Female - Forte - 26-01-2009 Fox, I may be wrong but I thought me meant it as the way MRPGE did it, with 2 arrows so you can select from a list of sprites to choose from Re: Class Sprite for Male and Female - Coke - 26-01-2009 Oh, thats easy then. You code it. |