Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KEY_MAP = {
- 0 => Input::NUMBERS[6],
- 1 => Input::NUMBERS[7],
- 2 => Input::NUMBERS[8],
- 3 => Input::NUMBERS[9],
- 4 => Input::NUMBERS[0]
- }
- def update_item_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- return_scene
- elsif Input.trigger?(Input::C)
- @item = @item_window.item
- if @item != nil
- $game_party.last_item_id = @item.id
- end
- if $game_party.item_can_use?(@item)
- Sound.play_decision
- determine_item
- else
- Sound.play_buzzer
- end
- else
- KEY_MAP.each_pair { |key, value|
- if Input.trigger?( value )
- Sound.play_decision()
- id = @item_window.item.nil?() ? 0 : @item_window.item.id
- $game_actors[1].set_item_slot( key, id )
- end
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment