Neko Fondateur
Messages : 184 Date d'inscription : 14/07/2013 Age : 25 Localisation : Ici, la plupart du temps.
| Sujet: Ace - HUD - Sword Art Online Mar 13 Aoû - 15:33 | |
| Ace - HUD - Sword Art OnlineAuteur : Lasso Logiciel : Rpg Maker VX ace Instructions : Téléchargez la démo, copiez/collez le script dans votre jeu ainsi que les images. Script : - Code:
-
class Spriteset_Map alias initialize_HUD initialize def initialize create_hud initialize_HUD end def create_hud @HUD = Sprite.new(nil) @HUD.z = 150 @HUD.bitmap =Bitmap.new("Graphics/System/HUD.png") @HPBAR = Sprite.new(nil) @HPBAR.z = 149 @HPBAR.bitmap = Bitmap.new("Graphics/System/HPBAR.png")
@old_name = "" @old_hp = 0 @old_max_hp = 0 @old_level = 0 end alias dispose_HUD dispose def dispose dispose_hud dispose_HUD end def dispose_hud @HUD.dispose @HPBAR.dispose end alias update_HUD update def update refresh_hud if @old_name != $game_party.members[0].name or @old_hp != $game_party.members[0].hp or @old_max_hp != $game_party.members[0].mhp or @old_level != $game_party.members[0].level update_HUD end def refresh_hud @HUD.bitmap.clear @HUD.bitmap = Bitmap.new("Graphics/System/HUD.png") @HUD.bitmap.draw_text(45, 22, 80, 30, $game_party.members[0].name) @HUD.bitmap.font.size = 16 @HUD.bitmap.draw_text(241, 45, 70, 20, $game_party.members[0].hp.to_s + "/" +$game_party.members[0].mhp.to_s, 1) @HUD.bitmap.draw_text(311, 45, 30, 20, "Lv " + $game_party.members[0].level.to_s, 1) @HPBAR.bitmap = Bitmap.new("Graphics/System/HPBAR.png") for x in 126..335 for y in 27..43 if y>-3*x/2+313*$game_party.members[0].hp/$game_party.members[0].mhp+218 @HPBAR.bitmap.set_pixel(x,y,Color.new(0,0,0,0)) end end end @old_level = $game_party.members[0].level @old_hp = $game_party.members[0].hp @old_max_hp = $game_party.members[0].mhp @old_name = $game_party.members[0].name end end Démo : http://www.4shared.com/rar/VGaVmezn/SAO_HUD.html?Screen : https://2img.net/r/ihimizer/img832/2961/novaimagemdebitmapa.png " border="0" alt=""/> | |
|