kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
1,058
Reaction score
493
First Language
English
Primarily Uses
RMXP
BGMSwitches RG

by Kyonides

Introduction


This scriptlet handles autoplaying BGM's and Game Switches for you... up to some point. :aswt:
You see, it's not fully automated.
Anyway, I left a couple of examples of how to configure the events and the common event in my demo.

You just need to set a single Constant with a range of Switch ID's you're going to need for BGM's and that's it! :D

If you ever need to configure the Common Event in charge of automatically changing the current BGM, you can use the following script call:

Ruby:
$game_map.map?(1)

And it will quickly check if the party is on map No. 1 right now.

FAQ

Its name says RG because it runs on all of the RGSS based Makers! :o

Ruby:
# * BGMSwitches RG * #
#   Scripter : Kyonides Arkanthes
#   v1.0.0 - 2023-05-25

# It works in all of the RGSS based Makers!

module BGMSwitches
  IDS_RANGE = 1..5 # Mininum..Maximum
end

class Game_Switches
  def any?(range)
    @data.any? and @data[range].any?
  end
end

class Game_Map
  alias :kyon_bgm_switches_gm_map_autoplay :autoplay
  def autoplay
    return if $game_switches.any?(1..5)
    kyon_bgm_switches_gm_map_autoplay
  end

  def map?(map_id)
    @map_id == map_id
  end
end


Terms & Conditions

Free for use in any game.
Include my nickname in your game credits.
Don't adopt stray cats nor blue squirrels nor any pokemon nor any sleeping beauty nor wandering zombies!
That's it!
 

Latest Threads

Latest Profile Posts

dV9O5Z.png


Continuing our countdown with Capsule Monster #14 Plug-Go! Plug-Go was originally meant to be the design of a gameboy game I wanted to make that was inspired by Megaman Battle Network! While that hasn’t worked out I’m happy I was able to recycle his design!
uApM6Gk.png

X6lGcLM.png

Took some time to pretty up the maps too.
Size Comparison.gif
12 hour little challenge for myself to do a big'ish enemy. Released for MV/MZ, working on my streamline one for later as I love the four frames over three. Spins a whole lot better I think.
Okay last one for now, it's time to go treat myself to some Zelda!

UPDATED- I've completely ripped off Sword of Mana right here lol
It seems like the imgur images are working again! ;3

Forum statistics

Threads
131,505
Messages
1,220,345
Members
173,224
Latest member
ZecaVn
Top