Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: MOAL on June 23, 2014, 11:03:00 am

Title: [XP] Temporary disable party switching? [Resolved]
Post by: MOAL on June 23, 2014, 11:03:00 am
I was wondering if there's a simple way to fix it to where you can't switch out the leader. Is that possible, or is it impossible? Maybe a way that would only disable party switching on maps without enemies instead of altogether?
Title: Re: [XP] Temporary disable party switching?
Post by: KK20 on June 23, 2014, 11:06:33 am
What scripts are you using?
Title: Re: [XP] Temporary disable party switching?
Post by: G_G on June 23, 2014, 11:06:56 am
You have to be more specific, like, I dunno, tell us which scripts you're using? Because by default you can't switch out party members in RMXP without any scripts. No one can help you unless you give us more information.
Title: Re: [XP] Temporary disable party switching?
Post by: MOAL on June 23, 2014, 11:09:20 am
Whoops, sorry. Still pretty early here. I mean in Blizz-ABS. :P Is there a way to temporarily disable party switching in that?
Title: Re: [XP] Temporary disable party switching?
Post by: KK20 on June 23, 2014, 11:23:35 am

#=============================================================================
# BLIZZABS Add-on
#   Prevents the player from switching leaders with the SWITCH button as long
#   as game switch DISABLE_LEADER_SWITCH is ON.
#=============================================================================
DISABLE_LEADER_SWITCH = 20

module BlizzABS
  class Controller
    alias allow_switching_leader switch_leader
    def switch_leader
      return if $game_switches[DISABLE_LEADER_SWITCH]
      allow_switching_leader
    end
  end
end

Place anywhere below Part 2 of BlizzABS (but above Main of course).
Title: Re: [XP] Temporary disable party switching?
Post by: MOAL on June 24, 2014, 08:48:45 am
Thanks, works fine.