overbound / SonicTimeTwisted

Source Code for a Sonic Fan Game Made in Game Maker Studio
https://overboundstudio.com/
GNU General Public License v3.0
60 stars 16 forks source link

Finishing SSZ sometimes leads into GGZ instead of PPZ #62

Closed AlexKhayrullin closed 3 years ago

AlexKhayrullin commented 4 years ago

It is a rare occurrence (it only ever happened to me twice) but it can happen that at after completing Sunken Saucer with all Chaos Emeralds and Time Stones (I guess these are prerequisites, I can't confirm) , Knuckles gets thrown into Galacnik Gauntlet Zone instead of Planetary Panic Zone act 1.

EDIT: Playing as Knuckles is not a prerequisite.

AlexKhayrullin commented 3 years ago

This can be accomplished by pressing UP more than once while entering the UFO at the end of TTZ Act 2:

For instance pressing UP twice correctly leads into SSZ, but after finishing it, PPZ Act 2 starts instead of Act 1. Pressing UP three times lets the player skip PPZ entirely.

AlexKhayrullin commented 3 years ago

Saving the value of objProgram.inputManager.flag_player_input to a temporary variable and setting it to false in objTransition's Create Event and restoring it on Destroy Event seems to fix the behavior. This also fixes another anomaly reported by @nkrapivin where tapping START twice on the Save screen very clearly starts the game twice.

While at first I wanted to test every transition, it didn't ultimately seem to be necessary to prevent input for most transitions, and even detrimental in some cases: for instance, the title card immobilizes the player at the beginning of DDZ Act1, while it didn't use to, which cancels all momentum and feels like a downgrade.

So objTransition was restored to its previous functionality and a new abstract object inheriting from it, objTransitionDisabledControls, has been created specifically for objEnterUFO and objFadeWhiteFromSave. If further transitions exhibit similar bugs, their parent object will be replaced, but right now, there is no need to do so with all of them.