Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Chracters you deafeat are automaticly unlocked.
#3
Basically, what you have to do is the following:

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();
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:
Code:
50
51
52
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.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:


Messages In This Thread
RE: Chracters you deafeat are automaticly unlocked. - by Silverthorn - 01-26-2010, 01:58 PM



Users browsing this thread: 1 Guest(s)