Main Menu
  • Welcome to The RPG Maker Resource Kit.

Window HP Script

Started by Kidkay, December 25, 2006, 01:43:10 AM

0 Members and 1 Guest are viewing this topic.

Kidkay

    WindowHP
    Version:1.2

    Introduction

    This Script is desgined to display your Partyleaders hp in the top left corner of the screen.

    Features


    • Displays Lead Character
    • Displays level
    • Displays HP
    • Displays SP

    Screenshot



    Demo

    new game.exe - 3.13MB

    Script



    #==============================================================================
    # ? Window_MenuStatus
    #------------------------------------------------------------------------------
    # ???????????????????????????????????
    #==============================================================================

    class Window_HP < Window_Selectable
     #--------------------------------------------------------------------------
     # ? ?????????
     #--------------------------------------------------------------------------
     def initialize
       super(0, 0, 215, 100)
       self.contents = Bitmap.new(width - 32, height - 32)
       self.contents.font.name = $defaultfonttype  # "Main" window font
       self.contents.font.size = $defaultfontsize
       refresh
       self.active = true
       self.index = -1
     end
     #--------------------------------------------------------------------------
     # ? ??????
     #--------------------------------------------------------------------------
    def refresh
       self.contents.clear
       @item_max = $game_party.actors.size
       for i in 0...$game_party.actors.size
         x = 64
         y = i * 116
         actor = $game_party.actors[i]
         draw_actor_graphic(actor, x - 50, y + 55)
         draw_actor_hp(actor, x + -15, y + 16)
         draw_actor_sp(actor, x + -15, y + 32)
         draw_actor_level(actor, x + -15 , y + 0)
         end
     end
     #--------------------------------------------------------------------------
     # ? ?????????
     #--------------------------------------------------------------------------
     def update_cursor_rect
       if @index < 0
         self.cursor_rect.empty
       else
         self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
       end
     end
    end


    Instructions

    Place the Script Under the Main Script USe an event to call the Script. . . .
    the Event line should read. . . .
    Quote<>Script: @VARIABLE = Window_HP.new()
    To remove the Script from the scree Place an event with the Dispose command
    the event line should read. . . .
    Quote<>Script: @VARIABLE.dispose()

    Compatibility

    THIS WAS Tested ON A NONOFFICAL VERSOIN OF RPGMAKER XP

    Credits and Thanks


    • Original script by me
    • Edited by Forte and Shawn of Spriteaholic

    This is version 1.2 of my script there probaly will be other version with varaious fuctions . . .  Stay tuned . . .

    This note is legal tender for all debts, public and private

    Snailer

    Hey that's funny :D

    Could make funny mini-games with it too ^^