random game over music plugin?

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
so let's say i have a pool of 12 audio files, okay? and i'd like to have one chosen randomly to play for the game over screen.
is there any plugin/script that allows such a thing?
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,818
Reaction score
5,213
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
62
Reaction score
11
First Language
português
Primarily Uses
RMVXA
* * * removed, use code below * * *
 
Last edited:

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
is there a way to make a sound have a very rare chance of playing?
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
62
Reaction score
11
First Language
português
Primarily Uses
RMVXA
is there a way to make a sound have a very rare chance of playing?
probably... i'll try to code it tomorrow, but no promises.
do you need many files to have a rare chance at appearing, or just one?
 

judg3

Villager
Member
Joined
Jul 31, 2020
Messages
8
Reaction score
2
First Language
romanian
Primarily Uses
RMVXA
probably... i'll try to code it tomorrow, but no promises.
do you need many files to have a rare chance at appearing, or just one?
just one
 

zeroscares

Veteran
Veteran
Joined
Oct 17, 2020
Messages
62
Reaction score
11
First Language
português
Primarily Uses
RMVXA
Code:
#==============================================================================
# ** Game Over Song Shuffle [VXA]
#------------------------------------------------------------------------------
# Version: 1.1
# Author: zeroscares
# Thread: https://bit.ly/3mdxuJM
#==============================================================================
# Description: 
#------------------------------------------------------------------------------
# Shuffles between song files for the Game Over screen.
# Has the option to add a file that has a much lower chance at playing.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste below Materials above Main. Customize the module below. 
#==============================================================================
# Terms:
#------------------------------------------------------------------------------
# > I'm not adding extra features or compatibility fixes
# > Crediting is optional. Free for all VXA games, edit as you wish.
#==============================================================================
module SCARES_GAMEOVER
  #--------------------------------------------------------------------------
  SONG_EXTENSION = "gameover"
  # Name your game over songs (song extension text + number)
  # example: "gameover1", "gameover2", ...
  #--------------------------------------------------------------------------
  LOWCHANCESONG = "randomsong" 
  # example: write "songfilename", not "songfilename.mp3"
  #--------------------------------------------------------------------------
  RANDOMCHANCE = 10
  # By default, low chance song has a 1 in 10 chance at playing.
  #--------------------------------------------------------------------------
  REGULARCHANCE_SONG_COUNT = 12
  # How many regular-chance songs do you need to be shuffled?
  # This excludes the song in LOWCHANCESONG.
  #--------------------------------------------------------------------------
end
#==============================================================================
# ** Scene_Gameover
#------------------------------------------------------------------------------
#  This class performs game over screen processing.
#==============================================================================
class Scene_Gameover < Scene_Base
  def play_gameover_music
    @lowchance = rand(SCARES_GAMEOVER::RANDOMCHANCE)
    p @lowchance
    if @lowchance == 1
      @gameoversong = SCARES_GAMEOVER::LOWCHANCESONG
      #p "low chance song"
    else
      @songnumber = rand(SCARES_GAMEOVER::REGULARCHANCE_SONG_COUNT) + 1 
      @gameoversong = SCARES_GAMEOVER::SONG_EXTENSION + @songnumber.to_s
    end
    RPG::BGM.stop
    RPG::BGS.stop
    RPG::BGM.new(@gameoversong, 100, 100).play
  end
end
you can say thanks now :p
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Evil7 added!


I did a bit of a remake on one of the maps, also I made a particle for jumping into the portal, and one for traveling through the portal. I'll probably add more sparkles later to embellish it. :LZSwink:
Polished the animation and added details :kaojoy:
Ami
What do you think about the Wood Bridge inside of Volcano?
Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.

Forum statistics

Threads
105,686
Messages
1,015,532
Members
137,362
Latest member
sdramose
Top