Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Menu - Naciśnij Dowolny Klawisz
Autor Wiadomość
egzudus 




Preferowany:
RPG Maker VXAce

Dołączył: 18 Gru 2012
Posty: 17
Wysłany: Nie 23 Gru, 2012 19:50
Menu - Naciśnij Dowolny Klawisz
~ Press Any Key ~


Krótki opis:
Skrypt ten przy odpaleniu gry pokazuje tekst aby gracz nacisnął dowolny klawisz i wtedy dopiero odpala się menu.

Autor:
LiTTleDRAgo

Kompatybilność:
RPG Maker VX

Skrypt:
Spoiler:

Kod:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# [Xp/Vx-VxA] Press Any Key Script
# Version 1.00
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_Command < Window_Selectable
 
  VX         = defined? Window_ActorCommand
  VXA        = defined? Window_BattleActor
  FONTNAME   = ['Calibri','Arial',Font.default_name]
  FONTSIZE   = 30
  TEXT       = 'Naciśnij Dowolny Klawisz'
  POS        = [0,330]   # Position X and Y
  ALIGN      = 1         # 0 = left, 1 = center, 2 = right
  RESOLUTION = VX ? [544,416] : [640,480]
                         # XP = [640,480], VX / VXA = [544,416]
  WAIT       = 10        # Wait time from each changing color
  STOP       = false     # Stop changing color when pressing any button
 
 
  alias init_drgprs_btn initialize unless method_defined?(:init_drgprs_btn)
  def initialize *args
    press_any_button if scene.is_a? Scene_Title
    init_drgprs_btn *args
  end
 
  def press_any_button
    Graphics.transition
    play_title_se
    create_press_any
    update_press_any
  end
 
  def play_title_se
    return scene.play_title_music if VX
    $game_system.bgm_play($data_system.title_bgm)
  end
 
  def create_press_any
    @spr = [Sprite.new,Sprite.new]
    @spr[0].bitmap = Bitmap.new(*RESOLUTION)
    @spr[0].bitmap.font.size = FONTSIZE
    @spr[0].bitmap.font.name = FONTNAME
    @spr[0].bitmap.draw_text(*[POS[0],POS[1]-230,RESOLUTION,TEXT,ALIGN].flatten)
    @spr[1].bitmap = @spr[0].bitmap.dup
    @spr.each_with_index {|s,i| s.z = i == 0 ? 100 : 70 }
  end
 
  def update_press_any
    while !update_input_press_basic
      update_ganti_warna
      [Graphics,Input].each {|s| s.update }
    end
    sound_play_ok
    while @spr[0].opacity > 0
      update_ganti_warna unless STOP
      @spr.each_with_index {|s,i| s.x = i == 0 ? s.x - 2 : s.x + 2 }
      @spr.each_with_index {|s,i| s.opacity -= 3 }
      [Graphics,Input].each {|s| s.update }
    end
    @spr.each {|s| s.dispose}
  end
   
  def update_input_press_basic
    return true if Input.trigger?(Input::A)
    return true if Input.trigger?(Input::B)
    return true if Input.trigger?(Input::C)
    return true if Input.trigger?(Input::X)
    return true if Input.trigger?(Input::Y)
    return true if Input.trigger?(Input::Z)
    return true if Input.trigger?(Input::L)
    return true if Input.trigger?(Input::R)
  end
 
  def scene() VXA ? SceneManager.scene : $scene end
   
  def sound_play_ok
    return VXA ? Sound.play_ok : Sound.play_decision if VX
    $game_system.se_play($data_system.decision_se) 
  end
 
  def update_ganti_warna
    @item_max = (@item_max || 0) + 1
    rgb = [rand(255),rand(255),rand(255)]
    @spr[0].flash(Color.new(*rgb),1) if @item_max % WAIT == 0
    @item_max = 0 if @item_max >= 240
  end
end

________________________
"Jeżeli zadanie warte jest jego wykonania,warte jest także by zginąć je wykonując..."
 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene