Vehikle SE
#1
Vehikle SE
VX + ACE

by Kyonides

Introduction

Did you ever need to play a SE once while boarding any vehicle during gameplay?
Guess what? Now you can do that in the blink of an eye! Winking

You just need to define a Filename, a Volume, and a Pitch for your SE's!
Take a look at the default options to find out how you can do it.

VX Script


Code:
# * Vehikle SE VX * #
#  Scripter : Kyonides Arkanthes
#  2023-11-24

# This scriptlet allows you to define a SE for each vehicle type.
# That SE will be played once whenever the player boards a given vehicle.

module Sound
  BOARD_SE = {}
  # BOARD_SE[Type] = ["Filename", Volume, Pitch]
  BOARD_SE[:boat] = ["Chime2", 70, 100]
  BOARD_SE[:ship] = ["Fog1", 70, 100]
  BOARD_SE[:airship] = ["Fire1", 70, 100]
  @vehicle_se = {} # Do Not Edit This Line!
  @types = [:boat, :ship, :airship]
  def self.find_vehicle_se(type)
    type = @types[type]
    RPG::SE.new(*BOARD_SE[type])
  end

  def self.play_vehicle_se(type)
    se = @vehicle_se[type] ||= find_vehicle_se(type)
    se.play
  end
end

class Game_Vehicle
  alias :kyon_vehikle_se_gm_veh_get_on :get_on
  def get_on
    kyon_vehikle_se_gm_veh_get_on
    Sound.play_vehicle_se(@type)
  end
end


VX ACE Script

Code:
# * Vehikle SE ACE * #
#  Scripter : Kyonides Arkanthes
#  2023-11-24

# This scriptlet allows you to define a SE for each vehicle type.
# That SE will be played once whenever the player boards a given vehicle.

module Sound
  BOARD_SE = {}
  # BOARD_SE[Type] = ["Filename", Volume, Pitch]
  BOARD_SE[:boat] = ["Chime1", 70, 100]
  BOARD_SE[:ship] = ["Fog1", 70, 100]
  BOARD_SE[:airship] = ["Fire1", 70, 100]
  @vehicle_se = {} # Do Not Edit This Line!
  def self.find_vehicle_se(type)
    RPG::SE.new(*BOARD_SE[type])
  end

  def self.play_vehicle_se(type)
    se = @vehicle_se[type] ||= find_vehicle_se(type)
    se.play
  end
end

class Game_Vehicle
  alias :kyon_vehikle_se_gm_veh_get_on :get_on
  def get_on
    kyon_vehikle_se_gm_veh_get_on
    Sound.play_vehicle_se(@type)
  end
end


Terms & Conditions

Free for use in ANY game. Gamer
Due credit is mandatory. Serious
That's it! Tongue sticking out
"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
Vehikle SE - by kyonides - 11-25-2023, 04:58 AM



Users browsing this thread: 1 Guest(s)