Jump to content
Sign in to follow this  
darthbirdy3

Triggering a common event whenever you change formation

Recommended Posts

I'd like a common event to activate any time I change formation. I'd like it to run through the event once any time the formation is changed :) Can a script do this?

Share this post


Link to post
Share on other sites

Try this:

module FORMATION_COMMON_EVENT
  ID = 1 # ID of the common event
end

class Scene_Menu < Scene_MenuBase
  
  #--------------------------------------------------------------------------
  # * Formation [OK]
  #--------------------------------------------------------------------------
  def on_formation_ok
    if @status_window.pending_index >= 0
      $game_party.swap_order(@status_window.index,
                             @status_window.pending_index)
      @status_window.pending_index = -1
      @status_window.redraw_item(@status_window.index)
      $game_temp.reserve_common_event(FORMATION_COMMON_EVENT::ID)
    else
      @status_window.pending_index = @status_window.index
    end
    @status_window.activate
  end

end

You can change the ID of the event at the top.

Share this post


Link to post
Share on other sites

THANK YOU SO MUCH! It works perfectly. I'd like to add you to the credits. Anything you'd like to go by?

  • Like 1

Share this post


Link to post
Share on other sites

Glad could help! ^^

Throwing just my nickname is fine, though um, to be honest I did almost nothing, so you really don't have to. ^^

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted