|
It is currently Mon May 21, 2012 1:34 am
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to icugigasoft
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today! |
 |
|
 |
|
| Author |
Message |
|
MarioSuperStar
|
Post subject: Re: [Script][Request] Command Cursor... Posted: Fri Apr 29, 2011 4:58 pm |
| Senior Member |
 |
 |
Joined: Mon Jun 28, 2010 5:55 pm Posts: 1270 Location: Look somewhere else...
|
|
@ud: tsk, tsk, tsk.... it works. you're right in the fact that he has to check all files, but you're missing something. i haven't ever set the global variable $UNLOCK since the beginning of all the game, the global variable $UNLOCK is nil, and then via script you make it true/false, so it isn't nil anymore, that's why i added the != nil thingie, so if the variable was never set, it doesn't check if it is true. Now, I tested it with a sound thingie with the conditional branch i wrote in Scene_Tittle, and the SOUND plays!
_________________ Super Mario RPG Working on:Maps
|
|
|
|
 |
|
U Division
|
Post subject: Re: [Script][Request] Command Cursor... Posted: Sun May 01, 2011 10:51 pm |
| Senior Member |
 |
 |
Joined: Sun Nov 01, 2009 7:38 pm Posts: 4321
|
|
But, MSS, that variable is created and destroyed every time you start and close the program. Facecake wants that when you beat the game, the title screen changes. Your method would work if after you beat the game, you press F12 or return to title screen after setting $unlock to true. But when you close out and open the game again, $unlock will be nil until set again and your title screen will be the normal one.
What he wants the script to do is check through all save files and see if $game_completed_variable is "true" or "on" and then it'll decide what title screen to use. For that, you'll need to be able to read some form of saved data. "$game_party.gold" won't mean anything until a game_party variables has been loaded, so your method requires that the person choose a game and load the file before it can read that "special variable." By the time this happens, it's too late to change the title screen.
|
|
|
|
 |
|
MarioSuperStar
|
Post subject: Re: [Script][Request] Command Cursor... Posted: Mon May 02, 2011 8:57 am |
| Senior Member |
 |
 |
Joined: Mon Jun 28, 2010 5:55 pm Posts: 1270 Location: Look somewhere else...
|
interesting, but there's a way to check all the files: #In the command_new_game, you add: $game_unlockables = Game_Unlockables.new #This class is only a copy of Game_Switches, but named by another name of class. #In the write_save_data method on Scene_save, you add a Marshal.dump of the new object, and a Marshal.load in the read_save_data in Scene_Load. #After this, you make a method in Scene_Tittle:
def check_all_save_files_unlocks(unlock_id) ok = false for i in 0...3 #Consider the number of maximum of files. file = File.open(filename, "wb") $game_unlockables = Marshal.load(file) ok = true if $game_unlockables[unlock_id] file.close end return ok end
#-------------------------------------------------------------------------- # * Make File Name # file_index : save file index (0-3) #-------------------------------------------------------------------------- def make_filename(file_index) return "Save#{file_index + 1}.rxdata" end
I am not that expert in Marshal stuff, so correct me if i am wrong...
_________________ Super Mario RPG Working on:Maps
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|