Save-Point
Level Up Event Script - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Level Up Event Script (/thread-372.html)



Level Up Event Script - daojones - 04-05-2010

An Event on each map that would create a text box notifying the player that he/she has "leveled up" when they have, in fact, leveled up.

Does that make sense?

THX


[Resolved] Level Up Event Script - deValdr - 04-05-2010

why put an event on each map?

http://forum.chaos-project.com/index.php?topic=117.0


[Resolved] Level Up Event Script - PK8 - 04-05-2010

This doesn't look like a request. Looks more like RGSS support. Moving. :o


[Resolved] Level Up Event Script - daojones - 04-05-2010

...That script wasn't what I was referring to.

My game works on a quest based system, so I'm going to need a notification that doesn't apply only to post-battle-screens. Which is why I said "An event on each map."


[Resolved] Level Up Event Script - Charlie Fleed - 04-06-2010

How many playable characters do you have?
Do you add and remove characters during the game?
What kind of information should this message show? Just "Joe leveled up"?
Do you want the ordinary message window that you have to close or something that fades away automatically?


[Resolved] Level Up Event Script - daojones - 04-06-2010

1, no, yes, fades away automatically.


[Resolved] Level Up Event Script - fgsfds - 04-06-2010

You should make an animation and some conditional check.... .-.


[Resolved] Level Up Event Script - Charlie Fleed - 04-07-2010

Or you can try this:

Code:
#==============================================================================
# ? Scene_Map
#------------------------------------------------------------------------------
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  alias main_level_up main
  def main
    @level_up_window = Window_Level_Up.new
    #original call
    main_level_up
    @level_up_window.dispose
  end

  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  alias update_level_up update
  def update
    @level_up_window.update
    # original call
    update_level_up
  end
end

#==============================================================================
# ? Window_Level_Up
#------------------------------------------------------------------------------
#==============================================================================

class Window_Level_Up < Window_Base
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  def initialize
    super(160, 416, 320, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = false
    @wait_count = 0
  end
  
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(self.contents.rect, $game_party.actors[0].name +
      " reached level " + $game_party.actors[0].level.to_s, 1)
  end

  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  def update
    if $game_system.old_level < $game_party.actors[0].level
      $game_system.old_level = $game_party.actors[0].level
      refresh
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      self.visible = true
      self.opacity = 255
      self.contents_opacity = 255
      @wait_count = 40
    else
      if @wait_count > 0
        @wait_count -= 1
      else
        if self.opacity > 0
          self.opacity -= 4
          self.contents_opacity -= 4
        else
          self.visible = false
        end
      end
    end  
  end
end

#==============================================================================
# ? Game_System
#------------------------------------------------------------------------------
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  attr_accessor :old_level
  #--------------------------------------------------------------------------
  #
  #--------------------------------------------------------------------------
  alias initialize_level_up initialize
  def initialize
    @old_level = 1
    # original call
    initialize_level_up
  end
end



[Resolved] Level Up Event Script - daojones - 04-09-2010

U ROK

That's exactly what I was looking for.