CONDITIONAL BRANCH TO CHECK IF THE GAME WAS LOADED
Posts
Pages:
1
So I got an interesting bit of critique for my project, which I would like to address, but I need to know what my options are.
In my game, you save the game by going to the washroom, you get one message explaining that your health and magic are restored, but your TP has been lowered. Then the player is asked if they wish to save. After that, the game returns, the player walks out of the bathroom and does a pose for a few seconds to the fanfare from Metroid Fusion.
Saving can be seen at the beginning of this video. Note that the visuals are different now and that the loading/saving bar has been decreased. I have those there because I think it looks cool and I also have a community art aspect of the project I'll be recruiting for soon! The beginning of the game also had it's difficulty toned down a bit to make it so the player wouldn't have to go and save often, which just took up time.
The critique I want to address
I want to make this process faster, but I want to keep the character doing the pose to the fanfare, it's just a bit of an homage to Metroid. I'm thinking the smartest way to address this issue while satisfying all parties is to have a conditional branch of some kind check if the player has loaded the game.
That's what Metroid does, you don't have to sit there and watch Samus as the fanfare goes when you save a game. This way, I can still have the effect I'd like (posing/fanfare on load game) but then save the player more of their time if they just want to save, making the process more streamlined.
So, is there any way I can have a conditional branch used after the save command that will check if the player has just loaded a game?
I'm a bit married to this idea, but I'm not opposed to suggestions. If you guys think I should do the saving a different way/have something else you think would be better, by all means; shoot!
In my game, you save the game by going to the washroom, you get one message explaining that your health and magic are restored, but your TP has been lowered. Then the player is asked if they wish to save. After that, the game returns, the player walks out of the bathroom and does a pose for a few seconds to the fanfare from Metroid Fusion.
Saving can be seen at the beginning of this video. Note that the visuals are different now and that the loading/saving bar has been decreased. I have those there because I think it looks cool and I also have a community art aspect of the project I'll be recruiting for soon! The beginning of the game also had it's difficulty toned down a bit to make it so the player wouldn't have to go and save often, which just took up time.
The critique I want to address
author=blackalchemist
just one tip: when you character does a little dance in the start of a level, make it a little faster.
I want to make this process faster, but I want to keep the character doing the pose to the fanfare, it's just a bit of an homage to Metroid. I'm thinking the smartest way to address this issue while satisfying all parties is to have a conditional branch of some kind check if the player has loaded the game.
That's what Metroid does, you don't have to sit there and watch Samus as the fanfare goes when you save a game. This way, I can still have the effect I'd like (posing/fanfare on load game) but then save the player more of their time if they just want to save, making the process more streamlined.
So, is there any way I can have a conditional branch used after the save command that will check if the player has just loaded a game?
I'm a bit married to this idea, but I'm not opposed to suggestions. If you guys think I should do the saving a different way/have something else you think would be better, by all means; shoot!
You're using Ace, right? There should be a script that allows for checking such a thing, if only because there are some that trigger on title start up and extra choices in the menu, so there must be something that is triggered when a game is loaded which you can latch on to. I have no idea what, though. Having a hard idea figuring out if there's an event command that could do such a thing without involving some sort of script check, too. >.<;
I'll have to leave it in the hands of the scripters on the site, I'm afraid, though I'll be keeping an eye out here just in case someone does come up with an eventing way of doing it. It's an interesting idea.
I'll have to leave it in the hands of the scripters on the site, I'm afraid, though I'll be keeping an eye out here just in case someone does come up with an eventing way of doing it. It's an interesting idea.
author=Liberty
I'll have to leave it in the hands of the scripters on the site, I'm afraid, though I'll be keeping an eye out here just in case someone does come up with an eventing way of doing it. It's an interesting idea.
No worries! And thanks for replying. :D
Well, I've learned through trial and error that the VX Ace has a little function in DataManager called "extract_save_contents". This function is called after loading a game. Now, maybe it's just me thinking weird things, but, if you want a "simple" check to see if a game's loaded, I would think that you could force-activate a $game_switch at the end of that function. Then, when the scene could occur (I'm sorta thinking you're doing a Common Event, but that's not necessarily the case), do a Conditional Branch event command based on that $game_switch being active/on, disabling the switch after the scene plays. In the case that it is not active/on (ie: you did not just load the game), your character just walks out.
At least, I think this would work. I'm not entirely sure, to be honest!
At least, I think this would work. I'm not entirely sure, to be honest!
extract_save_contents would be a good place to put any such code. Cram stuff after all of the assignments so it looks something like:
If you want the flexibility of a script you can pop in an out you can add this to your game:
I made a small sample project here. Talk to the crystal to save, what it does changes if you just saved or loaded a game since switch #1 is set to on/true when the game loads and it's false otherwise (make sure to turn the switch off when you're done!). It doesn't much with anything else besides setting that switch to true, I made a ditty little npc that uses switch 2 to demonstrate but is probably not necessary.
def self.extract_save_contents(contents) $game_system = contents[:system] $game_timer = contents[:timer] $game_message = contents[:message] $game_switches = contents[:switches] $game_variables = contents[:variables] $game_self_switches = contents[:self_switches] $game_actors = contents[:actors] $game_party = contents[:party] $game_troop = contents[:troop] $game_map = contents[:map] $game_player = contents[:player] $game_switches[1] = true # Switch 1 will be set to true when a game loads end
If you want the flexibility of a script you can pop in an out you can add this to your game:
module DataManager # Needed to alias a static method class << self alias extract_save_contents_onload extract_save_contents unless $@ end def self.extract_save_contents(*args) # First call the original load method, this will do the actual loading extract_save_contents_onload(*args) # Here is where you can cram in any code you want. For this demo I just # flip the switch IsLoaded (#1) to true $game_switches[1] = true # But you can do more stuff here too end end
I made a small sample project here. Talk to the crystal to save, what it does changes if you just saved or loaded a game since switch #1 is set to on/true when the game loads and it's false otherwise (make sure to turn the switch off when you're done!). It doesn't much with anything else besides setting that switch to true, I made a ditty little npc that uses switch 2 to demonstrate but is probably not necessary.
Thank you all for your replies. GreatRedSpirit, your script worked and did exactly what I needed. Thank you so much for your help!
if you happen to be using 2k3 and a badass you can check if the player loaded by checking what time the bgm is at after using the save point, if its at the 0 second/tick mark its probably loaded.
just in case 2k3ers are eavesdropping
just in case 2k3ers are eavesdropping
Hey, Darken, if Rpg Maker 2003 can do that, then can't VX ACE as well (the timing by music I mean)?
Or is that only possible if one has used OGV for their music files?
Or is that only possible if one has used OGV for their music files?
Pages:
1

















