Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Calvinchun

Need A Staff Great With Scripting

Question

Hey Everyone I Was In Building Of Project The Blood Of Dark the Dead The Survival Horror and I Have All The Scripts Of Shooting System But I Need A Assistance With Great At Scripting and I Could Need A Scripts That Make The Game Fulscreen Since im Bad at Scripting. I'm sorry if i Ask Too much but I Need An Assistance. Please Reply. Any Help I Will Appreciate Even A Command Or Tips. Hope Answer Soon...

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Here's a script

 

=begin
==============================================================================
Writen by: Mr Wiggles
ver. 1.3
Date 12/3/09

This script is for those who want to make the option of haveing the player 
decide if they would want to play in full screen with out having to press
Alt + Enter

Instructions:

This script is plug and play, just paste it ABOVE main, and BELLOW everything
else!
lable it Scene_FullPromt and thats it!

Hope you enjoy!  >.<

==============================================================================
=end
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_Command3 < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     width    : window width
 #     commands : command text string array
 #--------------------------------------------------------------------------
 def initialize(width, commands)
   # Compute window height from command quantity
   super(0, 0, width, commands.size * 32 + 32)
   @item_max = commands.size
   @commands = commands
   self.contents = Bitmap.new(width - 32, @item_max * 32)
   refresh
   self.index = 0
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...@item_max
     draw_item(i, normal_color)
   end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #     index : item number
 #     color : text color
 #--------------------------------------------------------------------------
 def draw_item(index, color)
   self.contents.font.color = color
   rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   self.contents.draw_text(rect, @commands[index])
 end
 #--------------------------------------------------------------------------
 # * Disable Item
 #     index : item number
 #--------------------------------------------------------------------------
 def disable_item(index)
   draw_item(index, disabled_color)
 end
end

#--------------------------------------------------------------------------
# Start Scene_FullPromp
#--------------------------------------------------------------------------
class Scene_FullPromp
#------------------------------------------------------------------------------  
# Begin by loading DataBase
#------------------------------------------------------------------------------
   $data_system = load_data("Data/System.rxdata")
   $game_system = Game_System.new
 def main
   s1 = "Full Screen"
   s2 = "Windowed"
   @command_window = Window_Command3.new(160, [s1, s2]) #192   
   @command_window.back_opacity = 160
   @command_window.x = 320 - @command_window.width / 2
   @command_window.y = 200
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update 
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @command_window.dispose
end
#--------------------------------------------------------------------------
#  Update
#--------------------------------------------------------------------------
def update
   @command_window.index = 1
   @command_window.update
   # If C button was pressed
   if Input.trigger?(Input::C)
     case @command_window.index
     when 0  # Yes
      showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
      showm.call(18,0,0,0)
      showm.call(13,0,0,0)
      showm.call(13,0,2,0)
      showm.call(18,0,2,0)
      $scene = nil
     when 1  # No
      $scene = nil
     end
   end
 end
end
#---------------------------------------------------------------------------
# Re-Write Main - It's Temperary for plug and play
#---------------------------------------------------------------------------
begin
 Graphics.freeze
  $scene = Scene_FullPromp.new
 while $scene != nil
   $scene.main
 end
 Graphics.transition(20)
rescue Errno::ENOENT
 filename = $!.message.sub("No such file or directory - ", "")
 print("Unable to find file #{filename}.")
end

 

 

Edited by bigace

Share this post


Link to post
Share on other sites
  • 0

Two-liner, stick it anywhere in the editor outside of a class:

 

win32 = Win32API.new('user32', 'keybd_event', 'llll', '')
[[18,0,0,0], [13,0,0,0], [13,0,2,0], [18,0,2,0]].each {|c| win32.call(*c) }

Edited by ForeverZer0

Share this post


Link to post
Share on other sites
  • 0

Thanks all for your help. Really appreciate it. But i feel shy to repay all of you :sweatdrop: Thanks all to you now it fullscreen.

Edited by Calvinchun

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...