01-26-2010, 01:58 PM
Basically, what you have to do is the following:
So what does this code want to tell us? Achievements are being put into a file called "achievements.txt" (yes, this has to be existent, I didn't want to extend this code any further). The IDs are specified as an array, thus you can make it more flexible. achievements.txt could look like this:
This could tell the procedure that IDs 50, 51, and 52 have been unlocked and so those characters are displayed.
As you can see, the method behind it is comparably simple. However, since it's using ASM and IO-stuff, it might be a little complicated to do via a DLL. Therefore, I would refrain from doing something like this.
Code:
--- pseudo-code ahead ---
// in stage-mode
if(ID[x].beaten()) {
achievementsArray = readOut("data\achievements.txt");
if(achievementsArray.doesNotInclude(ID[x])
achievementsArray.add(ID[x]);
}
// in character selection menu
achievementsArray = readOut("data\achievements.txt");
foreach(achievementsArray)
unlockChar();Code:
50
51
52As you can see, the method behind it is comparably simple. However, since it's using ASM and IO-stuff, it might be a little complicated to do via a DLL. Therefore, I would refrain from doing something like this.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt

Chat
