Project1

标题: 脚本问题 [打印本页]

作者: tiancaishiwo    时间: 2007-7-10 04:10
提示: 作者被禁止或删除 内容自动屏蔽
作者: tiancaishiwo    时间: 2007-7-10 04:10
提示: 作者被禁止或删除 内容自动屏蔽
作者: 小真·爱舞    时间: 2007-7-10 04:11
数字值的问题么....
把出错的那段发来看看...
可能是你插入错误什么的。。。
作者: 永劫的咎人    时间: 2007-7-10 04:12
提示: 作者被禁止或删除 内容自动屏蔽
作者: tiancaishiwo    时间: 2007-7-10 04:13
提示: 作者被禁止或删除 内容自动屏蔽
作者: 小真·爱舞    时间: 2007-7-10 04:13
orz,估计和囧人说的一样....
我手头有一个脚本,你试试这个。


  1. class Game_Battler
  2. BLACK_ELEMENT = "技能" # 戦闘背景を暗転化する時にこの名前の属性を設定して下さい
  3. end
  4. class Spriteset_Battle
  5. TONE_MARGINAL = 100
  6. BLACK_R = 5
  7. BLACK_G = 5
  8. BLACK_B = 5
  9. end

  10. #==============================================================================
  11. # ■ Game_Temp
  12. #------------------------------------------------------------------------------
  13. #  セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン
  14. # スタンスは $game_temp で参照されます。
  15. #==============================================================================

  16. class Game_Temp
  17. attr_accessor :black_flug               # ☆暗転用
  18. alias initialize_black_bant initialize
  19. def initialize
  20.    initialize_black_bant
  21.    @black_flug = false
  22. end
  23. end

  24. #==============================================================================
  25. # ■ Spriteset_Battle
  26. #------------------------------------------------------------------------------
  27. #  バトル画面のスプライトをまとめたクラスです。このクラスは Scene_Battle クラ
  28. # スの内部で使用されます。
  29. #==============================================================================

  30. class Spriteset_Battle
  31. alias update_black_bant update
  32. def update
  33.    update_black_bant
  34.    #if @battleback_sprite.tone.red != -TONE_MARGINAL
  35.    if $game_temp.black_flug && @battleback_sprite.tone.red != -TONE_MARGINAL
  36.      @battleback_sprite.tone.red -= BLACK_R
  37.      @battleback_sprite.tone.green -= BLACK_G
  38.      @battleback_sprite.tone.blue -= BLACK_B
  39.    #elsif @battleback_sprite.tone.red != 0
  40.    elsif !$game_temp.black_flug && @battleback_sprite.tone.red != 0
  41.      @battleback_sprite.tone.red += BLACK_R
  42.      @battleback_sprite.tone.green += BLACK_G
  43.      @battleback_sprite.tone.blue += BLACK_B
  44.    end
  45. end
  46. end

  47. #==============================================================================
  48. # ■ Game_Battler (分割定義 3)
  49. #------------------------------------------------------------------------------
  50. #  バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ
  51. # スのスーパークラスとして使用されます。
  52. #==============================================================================
  53. #=begin
  54. class Game_Battler
  55. alias attack_effect_black_bant attack_effect
  56. def attack_effect(attacker)
  57.    if attacker.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
  58.      $game_temp.black_flug = true
  59.    end
  60.    attack_effect_black_bant(attacker)
  61. end

  62. alias skill_effect_black_bant skill_effect
  63. def skill_effect(user, skill)
  64.    if skill.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
  65.      $game_temp.black_flug = true
  66.    end
  67.    skill_effect_black_bant(user, skill)
  68. end

  69. alias item_effect_black_bant item_effect
  70. def item_effect(item)
  71.    if item.element_set.include?($data_system.elements.index(BLACK_ELEMENT))
  72.      $game_temp.black_flug = true
  73.    end
  74.    item_effect_black_bant(item)
  75. end
  76. end

  77. #==============================================================================
  78. # ■ Scene_Battle (分割定義 4)
  79. #------------------------------------------------------------------------------
  80. #  バトル画面の処理を行うクラスです。
  81. #==============================================================================

  82. class Scene_Battle
  83. alias update_phase4_step6_black_bant update_phase4_step6
  84. def update_phase4_step6
  85.    if $game_temp.black_flug
  86.      $game_temp.black_flug = false
  87.    end
  88.    update_phase4_step6_black_bant
  89. end
  90. end
  91. #==============================================================================
  92. # ■ Scene_Battle (分割定義 1)
  93. #------------------------------------------------------------------------------
  94. #  バトル画面の処理を行うクラスです。
  95. #==============================================================================

  96. class Scene_Battle
  97. #--------------------------------------------------------------------------
  98. # ● メイン処理
  99. #--------------------------------------------------------------------------
  100. alias main_black_bant main
  101. def main
  102.    main_black_bant
  103.    # 戦闘終了時に暗転フラグをオフにしておく
  104.    $game_temp.black_flug = false
  105. end
  106. end






复制代码

作者: tiancaishiwo    时间: 2007-7-10 04:13
提示: 作者被禁止或删除 内容自动屏蔽
作者: tiancaishiwo    时间: 2007-7-10 04:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: tiancaishiwo    时间: 2007-7-10 04:15
提示: 作者被禁止或删除 内容自动屏蔽
作者: 小真·爱舞    时间: 2007-7-10 04:16
以下引用tiancaishiwo于2007-7-9 20:15:38的发言:

晕```````

用了你那脚本````战斗时候什么都没变```````


不会看着设定么。
要变化的技能选上属性:技能。
作者: tiancaishiwo    时间: 2007-7-10 04:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: 小真·爱舞    时间: 2007-7-10 04:18
以下引用tiancaishiwo于2007-7-9 20:17:46的发言:

忘记了

去试试谢谢了``


成功了的话记得回来认证答案哦。 [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: tiancaishiwo    时间: 2007-7-10 04:26
提示: 作者被禁止或删除 内容自动屏蔽




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