Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Playing a noise when you level up.

In RMXP, is there a way you could play a noise each time a character leveled up?
Would this require scripting?
Thanks in advance.
 
I found this post (from you)

Paste above main:

Code:
class Window_BattleStatus

  #--------------------------------------------------------------------------

  # * Set Level Up Flag

  #     actor_index : actor index

  #--------------------------------------------------------------------------

  def level_up(actor_index)

    @level_up_flags[actor_index] = true

    sound = RPG::AudioFile.new("LevelUp")

    $game_system.me_play(sound)

  end

end

 
Change "LevelUp" to the name of your sound effect, without the extension.
Make sure the SE is in your game SE folder, or in the RTP.

Be Well



But (even though you say) I don't know where to put the script =/

[ EDIT - fixed to avoid future confusion ]
 
FAQ":atodpmcz said:
If there were no installation directions provided or the ones that were, seem vague. Do as follows. First open your project, then your script editor(F11, the shortcut key). Insert an empty section in the script listing by right clicking 'Main' and selecting 'Insert'. Copy the text from the custom script document you want to install. Paste this code that was just copied into the large empty section on the right known as the code panel. Lastly go back to the listing of script on the left and name the section something informative and memorable for the script.

A picture of where your script will most likely go:
http://i229.photobucket.com/albums/ee31 ... cement.png[/img]
 
Follow the instructions in the FAQ (check my previous post). When you create a blank script, paste in the code in pestilence's post and change "LevelUp" to the name of a SE.
 
pestilence":1xx2i543 said:
I found this post (from you)

Paste above main:

Code:
class Window_BattleStatus
  #--------------------------------------------------------------------------
  # * Set Level Up Flag
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def level_up(actor_index)
    @level_up_flags[actor_index] = true
    $game_system.se_play("LevelUp")
  end
end
Change "LevelUp" to the name of your sound effect, without the extension.
Make sure the SE is in your game SE folder, or in the RTP.

Be Well



But (even though you say) I don't know where to put the script =/

Is there anyway to alter this to use an me instead of an se?
 
try this:

Code:
class Window_BattleStatus
  #--------------------------------------------------------------------------
  # * Set Level Up Flag
  #     actor_index : actor index
  #--------------------------------------------------------------------------
  def level_up(actor_index)
    @level_up_flags[actor_index] = true
    sound = RPG::AudioFile.new("LevelUp")
    $game_system.me_play(sound)
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top