The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Kidkay on December 25, 2006, 01:43:10 AM

Title: Window HP Script
Post by: Kidkay on December 25, 2006, 01:43:10 AM
WindowHP
Version:1.2

Introduction

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

Features


Screenshot

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi28.photobucket.com%2Falbums%2Fc203%2Fffsora%2FNewGame.jpg&hash=b55640a9c9a0374f1aafed72c7fb82205a5827cb)

Demo

new game.exe - 3.13MB (http://www.zshare.net/download/new-game-exe.html)

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


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

Title: Re: Window HP Script
Post by: Snailer on December 26, 2006, 10:17:47 PM
Hey that's funny :D

Could make funny mini-games with it too ^^