ein weiteres dickes danke...
tut mir leid das ich noch weitanerve, aber nu kommt das hia:
und hier folgt zeile 460:
game actor brauche ich ja nicht "nochmal" reinkopieren, das is da ja noch^^
ps: mich nerven diese fragezeichen <.<''
tut mir leid das ich noch weitanerve, aber nu kommt das hia:
|
|
Quellcode |
1 2 3 |
?????`(*,*2)Game_Actor`? 460? NoMethodError ???????? undefined method `include?´ for nil:NilClass |
und hier folgt zeile 460:
|
|
Quellcode |
1 |
and (item.kind.include?(@equip_sets[slot_id][key][1])\ |
game actor brauche ich ja nicht "nochmal" reinkopieren, das is da ja noch^^
ps: mich nerven diese fragezeichen <.<''
alsoo...
könnte es das hia sein? war im skript mit bei... musste ganz oben rein, und heißt rpg_item:
sonst wär da noch:scene_item und window_item, aber da steht weder kind noch include...
könnte es das hia sein? war im skript mit bei... musste ganz oben rein, und heißt rpg_item:
|
|
Quellcode |
1 2 3 4 5 6 7 8 |
ALL_ITEMS = -1
class RPG::Item
attr_accessor :kind
def setup
@kind = []
end
end |
sonst wär da noch:scene_item und window_item, aber da steht weder kind noch include...
Also es gibt jetzt 2 Möglichkeiten:
1. Entweder include? ist eine allgemeine Funktion, die nirgendwo erklärt werden muss.
2. Der Autor hat in RPG::Item diese vergessen.
Teste mal folgendes, mach aus der Zeile
and (item.kind.include?(@equip_sets[slot_id][key][1])\
diese hier
and (RPG::Item.kind.include?(@equip_sets[slot_id][key][1])\
1. Entweder include? ist eine allgemeine Funktion, die nirgendwo erklärt werden muss.
2. Der Autor hat in RPG::Item diese vergessen.
Teste mal folgendes, mach aus der Zeile
and (item.kind.include?(@equip_sets[slot_id][key][1])\
diese hier
and (RPG::Item.kind.include?(@equip_sets[slot_id][key][1])\
muhaha, ich hab den fehler allein behoben(habs einfach ma probiert^^)
nu kommt jedoch diese fehlermeldung:mad::
naja hier kommt dann mal zeile 97 aus scene_equip:
so, und hier der ganze scene_equip:
nu kommt jedoch diese fehlermeldung:mad::
|
|
Quellcode |
1 2 3 |
?????'(*)Scene_Equip' ? 97 ??? Argument errer ????????? wromg number of arguments(3 for 10) |
naja hier kommt dann mal zeile 97 aus scene_equip:
|
|
Quellcode |
1 |
@left_window.set_new_parameters(nil, nil, nil) |
so, und hier der ganze scene_equip:
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
#==============================================================================
# ■ Scene_Equip
#------------------------------------------------------------------------------
#  装備画面の処理を行うクラスです。
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor_index : アクターインデックス
# equip_index : 装備インデックス
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# アクターを取得
@actor = $game_party.actors[@actor_index]
# ウィンドウを作成
@help_window = Window_Help.new
@left_window = Window_EquipLeft.new(@actor)
@right_window = Window_EquipRight.new(@actor)
@item_window1 = Window_EquipItem.new(@actor, 0)
@item_window2 = Window_EquipItem.new(@actor, 1)
@item_window3 = Window_EquipItem.new(@actor, 2)
@item_window4 = Window_EquipItem.new(@actor, 3)
@item_window5 = Window_EquipItem.new(@actor, 4)
# ヘルプウィンドウを関連付け
@right_window.help_window = @help_window
@item_window1.help_window = @help_window
@item_window2.help_window = @help_window
@item_window3.help_window = @help_window
@item_window4.help_window = @help_window
@item_window5.help_window = @help_window
# カーソル位置を設定
@right_window.index = @equip_index
refresh
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@help_window.dispose
@left_window.dispose
@right_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
# アイテムウィンドウの可視状態設定
@item_window1.visible = (@right_window.index == 0)
@item_window2.visible = (@right_window.index == 1)
@item_window3.visible = (@right_window.index == 2)
@item_window4.visible = (@right_window.index == 3)
@item_window5.visible = (@right_window.index == 4)
# 現在装備中のアイテムを取得
item1 = @right_window.item
# 現在のアイテムウィンドウを @item_window に設定
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# ライトウィンドウがアクティブの場合
if @right_window.active
# 装備変更後のパラメータを消去
@left_window.set_new_parameters(nil, nil, nil)
end
# アイテムウィンドウがアクティブの場合
if @item_window.active
# 現在選択中のアイテムを取得
item2 = @item_window.item
# 装備を変更
last_hp = @actor.hp
last_sp = @actor.sp
#------------------ Edit -------------------------------
@actor.equip(@right_window.index, item2)
#/------------------ Edit -------------------------------
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
#------------------ Edit -------------------------------
@actor.equip(@right_window.index, item1)
#/------------------ Edit -------------------------------
@actor.hp = last_hp
@actor.sp = last_sp
# レフトウィンドウに描画
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
end
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@left_window.update
@right_window.update
@item_window.update
refresh
# ライトウィンドウがアクティブの場合: update_right を呼ぶ
if @right_window.active
update_right
return
end
# アイテムウィンドウがアクティブの場合: update_item を呼ぶ
if @item_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (ライトウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_right
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# メニュー画面に切り替え
$scene = Scene_Menu.new(2)
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# 装備固定の場合
if @actor.equip_fix?(@right_window.index)
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# アイテムウィンドウをアクティブ化
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
# R ボタンが押された場合
if Input.trigger?(Input::R)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 次のアクターへ
@actor_index += 1
@actor_index %= $game_party.actors.size
# 別の装備画面に切り替え
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
# L ボタンが押された場合
if Input.trigger?(Input::L)
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# 前のアクターへ
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 別の装備画面に切り替え
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (アイテムウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_item
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# ライトウィンドウをアクティブ化
@right_window.active = true
@item_window.active = false
@item_window.index = -1
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# 装備 SE を演奏
$game_system.se_play($data_system.equip_se)
# アイテムウィンドウで現在選択されているデータを取得
item = @item_window.item
#------------------ Edit -------------------------------
@actor.equip(@right_window.index, item)
#/------------------ Edit -------------------------------
@right_window.active = true
@item_window.active = false
@item_window.index = -1
# ライトウィンドウ、アイテムウィンドウの内容を再作成
@right_window.refresh
#------------------ Edit -------------------------------
@item_window1.refresh
@item_window2.refresh
@item_window3.refresh
@item_window4.refresh
@item_window5.refresh
#/------------------ Edit -------------------------------
return
end
end
end |

