Rian01 Advance
Posts : 318 Thanked : 0 Engine : RMVX Ace Skill : Beginner
Trophies
Awards: | Subyek: [RGSS3] HP MP Bar Above Actors 2013-02-03, 16:54 | |
| On Map HP & MP Bar Above Character Graphic Engine: VXace PengenalanScript ini digunakan agar terdapat HP dan MP bar di atas character graphic. Fitur
- Plug And Play
- Simple Configurations
Screenshots - Hartb61 wrote:
direct link https://dl.dropbox.com/u/75708618/Rian01_HPBar.jpg
Thanks for Hartbreak61 ScreenShot 2 Demo??? Scripts - Code:
-
#==============================================================================# # ON MAP HP & MP BAR # VX ace #==============================================================================# # Instruksi : # # o Paste Skrip di antara Main dan Material Section # # o Kostumisasi Modul dan Coba :) # #=======================================================#
#==============================================================================# # KONFIGURASI # #==============================================================================# module Wish module HPhud Munculkan_Bar = true # true Jika iya, false jika tidak. bisa juka memakai # $game_switches[id] untuk mengaktifkan temporer # Ukuran HP/MP Bar Panjang_bar = 28 # ukuran panjang H/MP bar dalam satuan pixel, rec. 30 Tinggi_bar = 3 # ukuran tinggi H/MP bar dalam satuan pixel, rec. 3 # Warna HP/MP Bar, terdiri 2 warna setiap bar. sehingga membentuk gradien. Warna_HP_Bar1 = 20 # index warna pd windowskin untuk HP bar paling kiri Warna_HP_Bar2 = 21 # index warna pd windowskin untuk HP bar paling kanan Warna_MP_Bar1 = 22 # index warna pd windowskin untuk MP bar paling kiri Warna_MP_Bar2 = 23 # index warna pd windowskin untuk MP bar paling kanan end end
#==============================================================================# # END OF CONFIGURATIONS # #==============================================================================#
#=============================================================================== # * Window_HPhud # An Invisible window that containts actor's gauge #===============================================================================
class Window_HPhud < Window_Base include Wish::HPhud #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 200, 200) @actor = actor update_placement refresh self.opacity = 0 # Don't Edit This :'( @module = Wish::HPhud end #----------------------------------------------------------------------------- # * Adjustable gauge height #----------------------------------------------------------------------------- def huddraw_gauge(x, y, width, rate, color1, color2) fill_w = (width * rate).to_i gauge_y = y + line_height - 8 contents.fill_rect(x, gauge_y, width, @module::Tinggi_bar, gauge_back_color) contents.gradient_fill_rect(x, gauge_y, fill_w, @module::Tinggi_bar, color1, color2) end
#-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 160 end def update_placement case @actor when 1 self.x = $game_player.screen_x - 27 self.y = $game_player.screen_y - 60 else self.x = $game_player.followers[@actor - 2].screen_x - 27 self.y = $game_player.followers[@actor - 2].screen_y - 60 end refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear huddraw_gauge(0, -8, @module::Panjang_bar, $game_party.battle_members[@actor - 1].hp_rate, text_color(@module::Warna_HP_Bar1), text_color(@module::Warna_HP_Bar2)) huddraw_gauge(0, -5, @module::Panjang_bar, $game_party.battle_members[@actor - 1].mp_rate, text_color(@module::Warna_MP_Bar1), text_color(@module::Warna_MP_Bar2)) end end
class Scene_Map alias st4rt start def start st4rt call_gauge end def call_gauge if Wish::HPhud::Munculkan_Bar @windowgauge1 = Window_HPhud.new(1) if $game_party.battle_members[0] != nil @windowgauge2 = Window_HPhud.new(2) if $game_party.battle_members[1] != nil @windowgauge3 = Window_HPhud.new(3) if $game_party.battle_members[2] != nil @windowgauge4 = Window_HPhud.new(4) if $game_party.battle_members[3] != nil end end alias upd4t3 update def update upd4t3 @windowgauge1.update_placement if $game_party.battle_members[0] != nil and @windowgauge1 != nil @windowgauge2.update_placement if $game_party.battle_members[1] != nil and @windowgauge2 != nil @windowgauge3.update_placement if $game_party.battle_members[2] != nil and @windowgauge3 != nil @windowgauge4.update_placement if $game_party.battle_members[3] != nil and @windowgauge4 != nil end end
class Game_Interpreter #-------------------------------------------------------------------------- # * Change Party Member #-------------------------------------------------------------------------- def command_129 actor = $game_actors[@params[0]] if actor if @params[1] == 0 # Add if @params[2] == 1 # Initialize $game_actors[@params[0]].setup(@params[0]) end $game_party.add_actor(@params[0]) else # Remove $game_party.remove_actor(@params[0]) end SceneManager.goto(Scene_Map) end end end
Terima Kasih telah mencoba script ini, jika anda menemukan bug / error / hal yang kurang, harap segera post di sini agar bisa segera diperbaiki
Terakhir diubah oleh Rian01 tanggal 2013-02-04, 15:47, total 6 kali diubah (Reason for editing : benerin tag judul ~ TheoAllen) | |
|
riozi_25 Newbie
Posts : 25 Thanked : 0 Engine : RMVX Skill : Beginner Type : Event Designer
| Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 17:30 | |
| jalan gk kalo pake RPG MK VX sya debug sob... game batle party undefined gtu | |
|
Rian01 Advance
Posts : 318 Thanked : 0 Engine : RMVX Ace Skill : Beginner
Trophies
Awards: | Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 17:36 | |
| @rio nggak bisa, soalnya ini RMVXace yang membutuhkan game_followers, scenemanager dll + iya, itu mungkin karena engine bukan vxace itu dopost kenapa? | |
|
riozi_25 Newbie
Posts : 25 Thanked : 0 Engine : RMVX Skill : Beginner Type : Event Designer
| Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 18:01 | |
| | |
|
The Dila Novice
Posts : 113 Thanked : 1 Engine : RMVX Skill : Very Beginner
| Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 18:11 | |
| @riozi_25: tiga kali jadi one-liner.. lapor aja ke mimin/momod... kan ada tombol merah yang isinya "!" .. klik aja di post-mu | |
|
EmperorAlan Senior
Posts : 622 Thanked : 5 Engine : RMVX Ace Skill : Very Beginner Type : Developer
| Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 19:57 | |
| @^: Hoh? Post apakah ini? Bukannya disebelah tombol "!" itu adalah tombol untuk menghapus postmu? Screenshot-nya dong. Masih kagak ngerti, yang dibilang character graphic ini yang mana? Di menu? Atau yang battle? | |
|
Rian01 Advance
Posts : 318 Thanked : 0 Engine : RMVX Ace Skill : Beginner
Trophies
Awards: | Subyek: re 2013-02-03, 20:09 | |
| @emperor alan udah berkali2 nyoba dengan berbagai image hoster tetep aja gagal tapi ini yang ada di map, jadi diatasnya character dan followers ada baris HP dan MP, seperti Warcraft 3 jika dipencet Alt kayaknya | |
|
Heartbreak61 Novice
Posts : 177 Thanked : 4 Engine : RMVX Ace Skill : Very Beginner Type : Event Designer
| Subyek: Re: [RGSS3] HP MP Bar Above Actors 2013-02-03, 20:35 | |
| this is EPIC! di bawah 200 line dan hasilnya langsung terasa btw izin ngasih screenshot, silakan ditaruh di 1st post kalo berkenan - Spoiler:
| |
|
Sponsored content
| Subyek: Re: [RGSS3] HP MP Bar Above Actors | |
| |
|