Sobeman459
Member
This bit of code has been driving me nuts for over 8hrs now. It's suppose to randomly choose one of those item ids from the list depending on the terrain tag the tile is and then shower that you caught "that items name" and add the item to the inventory, but it gives and error when it goes to show that text and then if you ignore that line its seems to work fine but nothing gets added to the inventory, can someone please help? Thanks you.
-Sobe
-Sobe
Code:
def hooked
if $hooked == false
$hooked = true
case $waterlevel
when 6
fishinwater = [142]
when 7
fishinwater = [142, 143, 144, 145, 146, 147, 148, 149, 150, 152]
end
end
$fish = rand(fishinwater)
if $hooked == true #If a fish was hooked, then catch it and wait a little.
$hooked = false
@help_window.set_text("You caught a " + $data_items[$fish] + "!", 1)
if Input.trigger?(Input::C)
$game_party.gain_item($fish, 1)
end
$game_system.me_play($data_system.battle_end_me)
$game_variables[1] += 1
$scene = Scene_Map.new
end
end
end