Project1

标题: VX多张随机渐变图 [打印本页]

作者: 神族召唤师    时间: 2009-10-8 18:37
标题: VX多张随机渐变图
VX多张随机渐变图

大家玩过柳大的《黑暗圣剑传说2》吧
那里面就有个随机渐变的系统
然后我研究了脚本
自己写的这个
可以说是柳大那个随机渐变的改良版吧
范例请看附件
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. #==============================================================================
  5. # 多张随机渐变图 by 神族召唤师
  6. #------------------------------------------------------------------------------
  7. # 功能描述: 1 用户可以指定战斗渐变图
  8. #           2 用户可以选择使用单张渐变图或者多张渐变图,在16行设置
  9. # 使用方法: 1 复制脚本,插入到Main之前
  10. #           2 在Graphics文件夹下新建Transitions文件夹,将渐变图存放到内
  11. #             当然路径也可以在脚本中相应的地方改
  12. #------------------------------------------------------------------------------

  13. class Scene_Map < Scene_Base
  14. #  设置但张渐变图或者多张渐变图
  15. #  1:单张渐变图  2.多张渐变图,战斗时随机选择
  16.   JIANBIAN = 2
  17. #  如果设置为1时,在脚本26行设置渐变图
  18. #  如果设置为2时,在脚本34-44行设置渐变图
  19. #  不想设置的话,将您的渐变图分别命名为1-6的数字即可
  20. #  注意:要使用多张渐变图功能必须使用6张渐变图

  21.   case JIANBIAN
  22.   when 1
  23.     def perform_battle_transition
  24.       Graphics.transition(80, "Graphics/Transitions/BattleStart", 80)
  25.       Graphics.freeze
  26.     end
  27.   when 2
  28.     def perform_battle_transition
  29.     randtst = rand(6)
  30.     case randtst
  31.     when 0
  32.       Graphics.transition(80, "Graphics/Transitions/1", 80)
  33.     when 1
  34.       Graphics.transition(80, "Graphics/Transitions/2", 80)
  35.     when 2
  36.       Graphics.transition(80, "Graphics/Transitions/3", 80)
  37.     when 3
  38.       Graphics.transition(80, "Graphics/Transitions/4", 80)
  39.     when 4
  40.       Graphics.transition(80, "Graphics/Transitions/5", 80)
  41.     when 5
  42.       Graphics.transition(80, "Graphics/Transitions/6", 80)
  43.     Graphics.freeze
  44.   end
  45.   end
  46. end
  47. end
  48. #==============================================================================
  49. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  50. #==============================================================================
复制代码

神族召唤师-多张随机渐变图.zip

483.23 KB, 下载次数: 236


作者: 小幽的马甲    时间: 2009-10-8 20:30
case randtst

    when 0

      Graphics.transition(80, "Graphics/Transitions/1", 80)

    when 1

      Graphics.transition(80, "Graphics/Transitions/2", 80)

    when 2

      Graphics.transition(80, "Graphics/Transitions/3", 80)

    when 3

      Graphics.transition(80, "Graphics/Transitions/4", 80)

    when 4

      Graphics.transition(80, "Graphics/Transitions/5", 80)

    when 5

      Graphics.transition(80, "Graphics/Transitions/6", 80)

-----------------------------------------------------------------------
这一段不用内嵌表达式么……
作者: 神族召唤师    时间: 2009-10-18 19:00
感谢意见




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1