Add Review
Subscribe
Nominate
Submit Media
RSS
Geeky Technical Blog - Shit Malfunctioning
Daria- 01/21/2013 09:22 PM
- 1067 views
ARGH!
Okay, so I set up a day and night cycle that adjusts the lighting/fog effects accordding to the time of day. No big deal, wasn't difficult and quite frankly - I followed a tutorial. I figure why reinvent the wheel if I can save myself some time?
Strangely enough the timer function didn't play well with my on screen enemies. If the timer happened to roll over during a battle it would cause the battle to exit and restart. Since I set the time to restart every 10 seconds for testing purposes this happened CONSTANTLY.
So again no big deal I figured I would simply pause the timer whenever a battle was initiated. This worked like a charm with one small caveat: the timer could only resume after the player either defeated the monster, or escaped the encounter. I had no way to flip the timer switch back on if the player simply outran the enemy on the map.
So again I figured I would just set a failsafe switch to turn the timer back on whenever the player exited the map. For the life of me I couldn't get this to fucking work! Because switches all execute at the same time I couldn't turn off the enemy encounter switch and have the timer switch "see" it before the player teleported to another map - without a functioning timer. AND if I tried to set a wait command to buffer inbetween the two it cause ANOTHER bug with my variable map teleportion that sent to player hurdling through space to a totally random coordinate!
UGH!
Couple hours of trial and error later I finally sorted things out though. Had to change a parallel triggering common event to one that called from within a map event. So instead of constantly triggering, it only happened exactly when I needed it to.
Only issue now is that the timer restarts after battles and when you leave the map. Not a big deal when it's only 10 seconds long, but when I set it to a more realistic 20 minutes or so it's going to be constantly prolonging my game days. So now I have to figure out if a. If that's a big deal gameplaywise and b. if there's a way to pause the timer or record it's setting and resume from a variable? Oh well at least the game breaking shit's been handled.
Okay, so I set up a day and night cycle that adjusts the lighting/fog effects accordding to the time of day. No big deal, wasn't difficult and quite frankly - I followed a tutorial. I figure why reinvent the wheel if I can save myself some time?
Strangely enough the timer function didn't play well with my on screen enemies. If the timer happened to roll over during a battle it would cause the battle to exit and restart. Since I set the time to restart every 10 seconds for testing purposes this happened CONSTANTLY.
So again no big deal I figured I would simply pause the timer whenever a battle was initiated. This worked like a charm with one small caveat: the timer could only resume after the player either defeated the monster, or escaped the encounter. I had no way to flip the timer switch back on if the player simply outran the enemy on the map.
So again I figured I would just set a failsafe switch to turn the timer back on whenever the player exited the map. For the life of me I couldn't get this to fucking work! Because switches all execute at the same time I couldn't turn off the enemy encounter switch and have the timer switch "see" it before the player teleported to another map - without a functioning timer. AND if I tried to set a wait command to buffer inbetween the two it cause ANOTHER bug with my variable map teleportion that sent to player hurdling through space to a totally random coordinate!
UGH!
Couple hours of trial and error later I finally sorted things out though. Had to change a parallel triggering common event to one that called from within a map event. So instead of constantly triggering, it only happened exactly when I needed it to.
Only issue now is that the timer restarts after battles and when you leave the map. Not a big deal when it's only 10 seconds long, but when I set it to a more realistic 20 minutes or so it's going to be constantly prolonging my game days. So now I have to figure out if a. If that's a big deal gameplaywise and b. if there's a way to pause the timer or record it's setting and resume from a variable? Oh well at least the game breaking shit's been handled.
Posts 

Pages:
1
LockeZ
I'd really like to get rid of LockeZ. His play style is way too unpredictable. He's always like this too. If he ran a country, he'd just kill and imprison people at random until crime stopped.
5958
I made a present for you.
No credit needed; I just added an extra conditional branch to the default timer script.
# Non-combat timer. # If switch #50 is on, timers work normally, but if # switch #50 is off, timers will only count down when # the player is not in combat. After battle it will # pick up where it left off. # To use a different switch instead of switch #50, change the 50 to a different number in the script below. class Game_System #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # reduce timer by 1 if @timer_working and @timer > 0 and ($scene.is_a?(Scene_Battle) or $game_switches[50] == true) @timer -= 1 end end end
No credit needed; I just added an extra conditional branch to the default timer script.
Pages:
1











