TheoAllen

Theo - Random Battle Transition

May 14th, 2013
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.63 KB | None | 0 0
  1. # =============================================================================
  2. # TheoAllen - Random Battle Transition
  3. # Version : 1.0
  4. # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
  5. # (This script documentation is written in informal indonesian language)
  6. # =============================================================================
  7. ($imported ||= {})[:Theo_BattleTransition] = true
  8. # =============================================================================
  9. # CHANGE LOGS:
  10. # -----------------------------------------------------------------------------
  11. # 2013.05.14 - Started and Finished script
  12. # =============================================================================
  13. =begin
  14.  
  15.   Perkenalan:
  16.   Script ini ngebikin tiap kali sebelum masuk battle akan menampilkan transisi
  17.   yang berbeda-beda
  18.  
  19.   Cara penggunaan :
  20.   Pasang diatas main tapi dibawah material
  21.  
  22.   Terms of use :
  23.   Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
  24.   keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
  25.   dipake buat komersil, jangan lupa, gw dibagi gratisannya.
  26.  
  27. =end
  28. # =============================================================================
  29. # Konfigurasi :
  30. # =============================================================================
  31. module THEO
  32.   module TRANSISI
  33.    
  34.     # Catat file2 untuk transisi disini. File harus ada di Graphics/system
  35.     LIST = [
  36.     # ["nama file     ,durasi ,blend],
  37.       ["Ash"          ,60     ,100],
  38.       ["BattleStart"  ,60     ,100],
  39.       ["Cloud"        ,60     ,100],
  40.       ["Eye"          ,60     ,100],
  41.       ["SlideRight"   ,60     ,100],
  42.       ["Startbattlev2",60     ,100],
  43.       ["Crossflame"   ,60     ,100],
  44.       ["Whitehole"    ,60     ,100],
  45.       ["Whirlwind"    ,60     ,100],
  46.    
  47.       # Durasi adalah lamanya transisi ditampilin.
  48.       # Blend adalah (bingung gw jelasinnya). semacem nilai ambiguitas antara
  49.       # screen sebelumnya ama sesudahnya. Coba2 sendiri lah :P
  50.      
  51.       # default duration = 60
  52.       # default blend = 100 (max 100)
  53.      
  54.     ] # <-- Jangan dihapus
  55.    
  56.   end
  57. end
  58. # =============================================================================
  59. # Akhir dari konfigurasi
  60. # =============================================================================
  61. class Scene_Map < Scene_Base
  62.  
  63.   def perform_battle_transition
  64.     array = THEO::TRANSISI::LIST
  65.     result = array[rand(array.size).to_i]
  66.     duration = result[1]
  67.     path = sprintf("Graphics/System/%s",result[0])
  68.     blend = result[2]
  69.     Graphics.transition(duration,path,blend)
  70.     Graphics.freeze
  71.   end
  72.  
  73. end
Advertisement
Add Comment
Please, Sign In to add comment