BGMSwitches XP
#1
BGMSwitches XP

by Kyonides

Introduction

This scriptlet handles autoplaying BGM's and Game Switches for you... up to some point. Happy with a sweat
You see, it's not fully automated. Laughing

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! Grinning 
If you ever need to configure the Common Event in charge of automatically changing the current BGM, you can use the following script call:

Code:
$game_map.map?(1)

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

Code:
# * BGMSwitches XP * #
#   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!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Messages In This Thread
BGMSwitches XP - by kyonides - 05-26-2023, 06:44 AM



Users browsing this thread: 1 Guest(s)