RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Learn Skill Sound Effect

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Learn Skill Sound Effect
Version: 1.0
Author: modern algebra
Date: September 3, 2009

Version History


  • <Version 1.0> 09.03.2009 - Original Release

Description


This script will play an SE when levelling if the actor has learned any new skills.

Features

  • Plays an SE of your choice when an actor learns a skill upon levelling up

Instructions

Place this script above Main and below Materials. If you wish to change the SE that plays, scroll down to line 30 and read the instructions located there.

Script


Code: [Select]
#==============================================================================
#    Learn Skill Sound Effect
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: September 3, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#    
#    This script will play an SE when levelling if the actor has learned any
#   new skills.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script above Main and below Materials.
#
#    If you wish to change the SE that plays, scroll down to line 30 and read
#   the instructions located there.
#==============================================================================
# ** Game Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constant - LSSE_LEARN_SKILL_SE
#    aliased method - display_level_up
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Class Constants
  #``````````````````````````````````````````````````````````````````````````
  #  LSSE_LEARN_SKILL_SE - an array holding the name, volume, and pitch of
  # the SE to be played when learning a new skill through level up. The
  # format is:
  #
  #      ["se_name", se_volume, se_pitch]
  #          se_name : the name of the file to be played. This must be there.
  #          se_volume : the volume of the SE to be played. If left blank, it
  #            defaults to 100
  #          se_pitch : the pitch of the SE to be played. If left blank, it
  #            defaults to 100
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  LSSE_LEARN_SKILL_SE = ["Up", 80]
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Show Level Up Message
  #     new_skills : Array of newly learned skills
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgb_zero_se_skilllearn_lvlup_8kb3 display_level_up
  def display_level_up(new_skills, *args)
    # Play SE unless no new skills passed
    RPG::SE.new (*LSSE_LEARN_SKILL_SE).play unless new_skills.empty?
    # Run Original Method
    malgb_zero_se_skilllearn_lvlup_8kb3 (new_skills, *args)
  end
end

Credit


  • modern algebra

Thanks

  • Zero2008, for the request

Support


Please post here with suggestions or bug reports.

Known Compatibility Issues

No known compatibility issues

Author's Notes


Kind of minor and useless, but easy and a request, so I figured I'd share. No credit is necessary.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:48:12 PM by Modern Algebra »

**
Rep: +0/-0Level 83
Very cool, and yet simple script!  I've seen a bunch of requests for something like this lately!

EDIT: Hehe, I posted 15 miliseconds before Zero2008.

**
Rep:
Level 84
Thanks man! I've been wanting this script for a long time.
But is it possible to put a little bit of wait time before playing the SE?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
It can be done pretty easily if you are willing to use Zeriab's Scheduler.

Make sure that you include the part that binds it to Graphics.update. Once you do that, then replacing the script with the following code will allow you to set the delay for as long as you like:

Spoiler for:
Code: [Select]
#==============================================================================
#    Learn Skill Sound Effect
#    Version: 1.0
#    Author: modern algebra
#    Date: September 3, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#   
#    This script will play an SE when levelling if the actor has learned any
#   new skills.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script above Main and below Materials.
#
#    If you wish to change the SE that plays, scroll down to line 30 and read
#   the instructions located there.
#==============================================================================
# ** Game Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constant - LSSE_LEARN_SKILL_SE
#    aliased method - display_level_up
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Class Constants
  #``````````````````````````````````````````````````````````````````````````
  #  LSSE_LEARN_SKILL_SE - an array holding the name, volume, and pitch of
  # the SE to be played when learning a new skill through level up. The
  # format is:
  #
  #      ["se_name", se_volume, se_pitch]
  #          se_name : the name of the file to be played. This must be there.
  #          se_volume : the volume of the SE to be played. If left blank, it
  #            defaults to 100
  #          se_pitch : the pitch of the SE to be played. If left blank, it
  #            defaults to 100
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  LSSE_LEARN_SKILL_SE = ["Up", 80]
  LSSE_SE_DELAY = 30 # Time, in frames, to wait before playing SE
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Show Level Up Message
  #     new_skills : Array of newly learned skills
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgb_zero_se_skilllearn_lvlup_8kb3 display_level_up
  def display_level_up(new_skills, *args)
    # Play SE unless no new skills passed
    proc = Proc.new {RPG::SE.new (*LSSE_LEARN_SKILL_SE).play}
    Scheduler.schedule (LSSE_SE_DELAY, proc) unless new_skills.empty?
    # Run Original Method
    malgb_zero_se_skilllearn_lvlup_8kb3 (new_skills, *args)
  end
end