Vehicle BGM Fix Hitskin_logo Hitskin.com

Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o temaVoltar para a ficha do tema

Aldeia RPG
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Vehicle BGM Fix

Ir para baixo

Vehicle BGM Fix Empty Vehicle BGM Fix

Mensagem por Valentine Qui Fev 22, 2018 12:38 pm

This script fixes vehicle BGM related bugs:


  • While the map BGM is playing, when you get on a vehicle, transfer maps, and get off, the BGM played is the BGM that was playing when you got on the vehicle, and not the new map's BGM
  • When you transfer maps while on a vehicle, if the new map has an autoplay BGM it will start playing instead of the vehicle BGM

Download

Get it at Hime Works

Or

Código:
=begin
#===============================================================================
 Title: Vehicle BGM Fix
 Author: Hime
 Date: Sep 26, 2013
--------------------------------------------------------------------------------
 ** Change log
 Sep 26, 2013
   - initial release
--------------------------------------------------------------------------------  
 ** Terms of Use
 * Free to use in non-commercial projects
 * Contact me for commercial use
 * No real support. The script is provided as-is
 * Will do bug fixes, but no compatibility patches
 * Features may be requested but no guarantees, especially if it is non-trivial
 * Credits to Hime Works in your project
 * Preserve this header
--------------------------------------------------------------------------------
 ** Description
 
 This script fixes vehicle BGM related bugs:
 
 - when you get on a vehicle, transfer maps, and get off, the BGM played is
   the BGM that was playing when you got on the vehicle
  
 - when you transfer maps on a vehicle, if the new map has autoplay BGM
   it will start playing instead
--------------------------------------------------------------------------------
 ** Installation
 
 Place this script below Materials and above Main
 
--------------------------------------------------------------------------------
 ** Usage
 
 Plug and Play
 
#===============================================================================
=end
$imported = {} if $imported.nil?
$imported["TH_VehicleBGMFix"] = true
#===============================================================================
# ** Rest of Script
#===============================================================================

#-------------------------------------------------------------------------------
# Don't autoplay map music after setting up
#-------------------------------------------------------------------------------
class Game_Map
  alias :th_vehicle_bgm_fix_autoplay :autoplay
  def autoplay
    return unless $game_player.is_walk?
    th_vehicle_bgm_fix_autoplay
  end
  
  def play_music
    @map.bgm.play if @map.autoplay_bgm
    @map.bgs.play if @map.autoplay_bgs
  end
end

class Game_Player
  def is_walk?
    @vehicle_type == :walk
  end
end

#-------------------------------------------------------------------------------
# If different map has different music, play the new music
#-------------------------------------------------------------------------------
class Game_Vehicle < Game_Character
  
  alias :th_vehicle_bgm_fix_get_on :get_on
  def get_on
    th_vehicle_bgm_fix_get_on
    @walking_map_id = $game_map.map_id
  end
  
  alias :th_vehicle_bgm_fix_get_off :get_off
  def get_off
    th_vehicle_bgm_fix_get_off
    if $game_map.map_id != @walking_map_id
      RPG::BGM.stop
      $game_map.play_music
    end
  end
end

Credits: Tsukihime
Valentine
Valentine
Administrador
Administrador

Medalhas : Vehicle BGM Fix ZgLkiRU
Mensagens : 5343
Créditos : 1164

https://www.aldeiarpg.com/

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos