When use item automatically force it to player 1.

When use item in menu i don't want it to shows up actor's select window.
Can it just force apply to first actor? (my game has only 1 actor by the way)

Which part of script should i change?
Scripts is where completed scripts are shared with others.

Moved to: RGSSx Script Support
Here's a script I wrote. It skips the actor selection when using a usable item.
Code:
class Scene_ItemBase < Scene_MenuBase 
  def determine_item
    if item.for_friend?
      @actor_window.select_for_item(item)
      @actor_window.process_ok
      hide_sub_window(@actor_window)
    else
      use_item
      activate_item_window
    end
  end
 
  def use_item
    play_se_for_item
    user.use_item(item)
    use_item_to_actors
    check_common_event
    check_gameover
  end
end
Insert below every script.
Here's a script I wrote. It skips the actor selection when using a usable item.
Code:
class Scene_ItemBase < Scene_MenuBase
  def determine_item
    if item.for_friend?
      @actor_window.select_for_item(item)
      @actor_window.process_ok
      hide_sub_window(@actor_window)
    else
      use_item
      activate_item_window
    end
  end
 
  def use_item
    play_se_for_item
    user.use_item(item)
    use_item_to_actors
    check_common_event
    check_gameover
  end
end
Insert below every script.

thanks bro! sry for late reply.

Original thread: https://forums.rpgmakerweb.com/threads/when-use-item-automatically-force-it-to-player-1.75598/