Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Fullscreen script

i cant seem to get this full screen script to work

the scene title keeps having an error on line 7

#==============================================================================
# Scene_Title
#==============================================================================

class Scene_Title
 
  alias main_fullscreen? main
  def main
    if TONS_OF_ADDONS::FULLSCREEN && !$DEBUG
      unless $game_started
        Graphics.freeze
        $data_system = load_data('Data/System.rxdata')
        $game_system = Game_System.new
        @window = Window_FullScreen.new(320, ['Yes' ,'No'])
        @window.x = 320 - @window.width / 2
        @window.y = 240 - @window.height / 2
        @window.opacity = 0
        Graphics.transition(10)
        loop do
          Graphics.update
          Input.update
          @window.update
          update_window
          break if $game_started
        end
        Graphics.freeze
        @window.dispose
        @window = nil
        Graphics.transition(10)
        Graphics.freeze
      end
    else
      $game_started = true
    end
    main_fullscreen?
  end
 
  def update_window
    if Input.trigger?(Input::C)
      if @window.index == 0
        $game_system.se_play($data_system.decision_se)
        keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
        keybd.call 0xA4, 0, 0, 0
        keybd.call 13, 0, 0, 0
        keybd.call 13, 0, 2, 0
        keybd.call 0xA4, 0, 2, 0
      else
        $game_system.se_play($data_system.cancel_se)
      end
      $game_started = true
    elsif Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $game_started = true
    end
  end

end
 
Ok, I found many problems with this. For one, the scripting is terrible and it's all over the place. lol

Your Scene_Title Script is relying on something called Tons of AddOns, which I didn't even see there. I'm assuming that the Tons of AddOns thing is from Blizzard, but I can't say for certain.

The other thing was that your Window_Command's class was changed from Window_Command to Window_Fullscreen. At one point I was getting an error for an uninitailized constant because the class it was searching for didn't even exist.

So, I got you a different script, making it more conveniant for the both of us. It does exactly what you wanted the other one to do, except the scripting is much better and easy to edit. All it does is edit Scene_Main by changing $scene = Scene_Title.new to $scene = Scene_FullScreen.new and creates a new class.

Here's the demo I re-uploaded for you.

Also, at any point, If you want to change the positioning of the fullscreen choice opions and the question itself,
just mess around with these lines.
Code:
@command          = Window_Command.new(96, ["Yes", "No"])
    @command.x        = @window.width + @window.x - 128
    @command.y        = @window.height + @window.y - 16
They're on lines 75, 76, and 77 of the [KN]::Toggle Full Screen script. Just fuck around with the coordinates(#'s) until you get it the way you want.

Also, this is a great script made by Kain Nobel, as you will see in the script itself, so make sure to credit him.

Good luck on your game, and I hope this was what you were looking for.  :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top