Preventing Game Over Event Skip

I'm using a nifty VX Ace script by Hime. http://himeworks.com/2013/10/gameover-events/

I've set up my Game Over Event and everything works fine. The only problem is if the player presses the "C button", (Z key)
they can skip the whole thing and just return to the title screen.

Is there a way to make sure the entire event plays out before returning to the title screen?
Block player input somehow?

I feel it takes away from the game if the player can just skip it...
The whole event lasts about 30 seconds so it isn't as if the player needs to skip it because it's such a
long and drawn out scene or anything...
You could rewrite the Input.press? method so that it always returns false when a certain switch is set to true. If you do that you can simply turn the said switch on and everything would work fine.

Code:
module Input
  class << Input
    alias hrk_press_old press?
    def press?(key)
        return false if $game_switches[switch_id_goes_here]
        hrk_press_old(key)
    end
  end
end

I am not sure if the Input.trigger? method calls the press? method internally since the Input module is not completely documented. If it does not, you have to add another alias to redirect the Input.trigger method.
Moved to: RGSS Script Support
(You may notice that I also edited your post - that was just to add in the script is for VX Ace, since that's less obvious now that it's in this subforum.)
You could rewrite the Input.press? method so that it always returns false when a certain switch is set to true. If you do that you can simply turn the said switch on and everything would work fine.

Code:
module Input
  class << Input
    alias hrk_press_old press?
    def press?(key)
        return false if $game_switches[switch_id_goes_here]
        hrk_press_old(key)
    end
  end
end

I am not sure if the Input.trigger? method calls the press? method internally since the Input module is not completely documented. If it does not, you have to add another alias to redirect the Input.trigger method.


That's... a bit over my head...

I'm unsure where to put the code you provided me with...

When I tried just copying it into my list of scripts it seemed to have no effect. I assigned a switch and everything...
I no doubt put it in the wrong place...

I couldn't find an area in Hime's script that seems to deal with the Input Module, I couldn't even find it in the default scripts.

Of course I have often been known to miss things that are directly in front of my face...
I no doubt put it in the wrong place...
That is not necessarily true, and I warned you of the possibility and the reason behind that in my previous post, so don't put the blame on yourself for that. As I said, the Input module is a hidden one, the internal structure of its methods is not known.
I am not sure if the Input.trigger? method calls the press? method internally since the Input module is not completely documented. If it does not, you have to add another alias to redirect the Input.trigger method.
You can alias the Input.trigger method by adding a few lines to that code.
Spoiler: The complete code
Code:
module Input
  class << Input
    #------------------------------------------------------------
    # * Aliased method: press?
    #------------------------------------------------------------
    alias hrk_press_old press?
    def press?(key)
       return false if $game_switches[switch_id_goes_here]
       hrk_press_old(key)
    end # Press
    #------------------------------------------------------------
    # * Aliased method: trigger?
    #------------------------------------------------------------
    alias hrk_trigger_old trigger?
    def trigger?(key)
      return false if $game_switches[switch_id_goes_here]
      hrk_trigger_old(key)
    end # Trigger
  end
end
The alias method worked! Thank you so much Heirukichi!
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/preventing-game-over-event-skip.111138/