When use item automatically force it to player 1.

MoloRid3r

Villager
Member
Joined
Jan 15, 2017
Messages
24
Reaction score
1
First Language
Thai
Primarily Uses
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?
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Scripts is where completed scripts are shared with others.

[move]RGSSx Script Support[/move]
 

vFoggy

Veteran
Veteran
Joined
Nov 3, 2012
Messages
71
Reaction score
31
Primarily Uses
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.
 

MoloRid3r

Villager
Member
Joined
Jan 15, 2017
Messages
24
Reaction score
1
First Language
Thai
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top