赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 5 |
经验 | 31761 |
最后登录 | 2025-9-10 |
在线时间 | 1789 小时 |
- 梦石
- 0
- 星屑
- 507
- 在线时间
- 1789 小时
- 注册时间
- 2009-7-12
- 帖子
- 443
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
這是我將官網的S_HUD修該而成的怪物血條
6 `+ T; ^+ t) r8 B會在每隻事件怪物的腳下顯示$ p4 ~* e5 N" W) i
問題是不知道為什麼
( a: _7 s& z2 J! c. o有時打怪打一打會跳出) X# k1 ^) }& l
---------------------------7 M: C8 b# x) S4 K
XAS
5 ~% e5 \, V7 ~. }$ J6 ~$ F1 O---------------------------9 l# j) n( Z* \" f- l5 Z
脚本 'MOG - S HUD' 的 203 行 发生了 RGSSError。
; ?' o6 J1 |* c4 i. h6 V% l) h
( A6 l6 W# U0 k4 g4 Qdisposed bitmap% O2 H% E7 e3 Q- ^2 T" W
---------------------------
6 M3 [* @/ q, O4 v確定 & I7 T* u7 z: Q N/ }3 U
---------------------------: o5 t# X7 A4 L
) M' v$ `$ G! i. U! }- R2 }! ~; d2 L這是腳本
$ I+ ?7 H; o+ R7 k2 j6 p5 C3 l9 K0 ~+ e: S: X- Y) X
- #===============================================================================
0 L' n. c% `! [8 s; h - # MOG - s Hud 1.0
7 I4 @, h# o8 @1 x+ k5 k - #===============================================================================
, ^1 Q+ m, W5 C# ` g: V/ L$ x% p% ] - # By Moghunter
/ W' h' G2 ~: ]) Z" F5 { - # http://www.atelier-rgss.com
5 k& U. ?8 u3 D/ @9 j- r2 ^8 k: d - #===============================================================================' ^% c0 G3 j/ @$ J
- # Translated by Calvin624 7 T/ O+ B2 |3 Q2 l- X
- # http://www.xasabs.wordpress.com+ Z: _% D' b$ m+ v+ I% h
- #===============================================================================
9 S( P+ i" y/ ~5 }6 l - ###############################-DESCRIPTION-####################################
$ g1 K- x. I7 H' I9 A - #===============================================================================
6 `5 d2 o- T; l - # Personal HUD – displays the HP and SP below the hero.
3 _2 V5 D# X3 E% O% V - #===============================================================================
3 y4 d0 I x9 J - #
8 h, J8 l" t) s5 s - # Graphics required:) g4 H( @/ ~* T1 W7 F( ^$ x* \4 \2 Z" k
- #
) f: N% S* x; E - # S_Border_HP_Meter.png
5 }% L- [5 W6 Z- s Q' }& t - # S_Border_SP_Meter.png
2 Q2 l- ~* O8 C: l( w W& c - # S_HP_Meter.png( e4 j* O' o4 C% ^! `
- # S_SP_Meter.png
1 f, c! X" V4 N w# |9 W - #
) C" X* o, b) b& T: f+ H8 L, X - # All images must be in the Windowskin folder.# R6 [3 \& v6 V
- #7 i* s$ G9 `! C- N
- #===============================================================================1 A# R5 I: V9 d* U$ \) T6 Z
- module MOG' n) t7 e% i7 a* t$ u
- VISIBLE_DEF = false
, x- ~9 `8 |# B6 }$ R( D - # Show HP meter?
/ F! G7 X) L2 j4 @ - HP_HUD = true
+ | w1 A8 o7 e; K, @/ T - # Position of the HP border
& k! D% g/ z* F G8 D* T - S_BORDER_HP_METER_X = -2
; q+ b9 u$ t( W8 {4 S8 E* e" } - S_BORDER_HP_METER_Y = -2 9 H1 r. B3 n. Y, s2 `
- # Position of the HP meter
3 E, `7 ^. d I - S_HP_METER_X = 00 i7 ~2 w: Z! Z3 ^, H
- S_HP_METER_Y = 0
. Z. y$ t3 Q# Y* P% W0 S - # Show SP meter?: \6 X% _4 {5 t' b, V
- SP_HUD = true
5 w; I! ]: |* Y$ E+ K2 y1 S4 I) D! S - # Position of the SP border
$ \* a8 e, q3 t% |$ Z, b; t9 A - S_BORDER_SP_METER_X = 06 r: A( s7 Z* M# e& T; I
- S_BORDER_SP_METER_Y = 10
5 L( y* l) _6 [& Z8 ~( l" V - # Position of the SP meter5 Y! |- t( c5 Z7 d
- S_SP_METER_X = 05 u; v- d7 K4 Z4 t* B9 Z& x
- S_SP_METER_Y = 10, N6 q$ _7 [$ A, A- ~# t
- # Switch to disable the HUD
6 H" m: n/ X, v7 W2 Z$ d+ n8 @9 | - DISABLE_SHUD_SWITCH = 5
0 W4 M" T7 @4 ]) R; ]6 N4 t' b. A - RANGE = 20
6 r4 i0 V0 ^& q - end
' m! u( R4 y$ t" s% K# z1 S - #===============================================================================
; V" X1 d' s0 G4 G2 F7 |3 V( f - # S Hud
& R& ]5 y& V$ T( J r! Z - #===============================================================================- W$ a; [8 S! b- E
- class S_Hud < RPG::Sprite
% d( T/ `/ O2 \: E5 ?- Z0 K - include MOG6 U" N3 w# l9 E) C$ R+ t2 g
- #--------------------------------------------------------------------------
8 ]2 H0 i* O' e. _+ D - # * Initialize
' X0 ~* ^: o* y) o( d - #--------------------------------------------------------------------------+ w4 h4 s* L$ \, d
- def initialize(enemy,viewport)
& I3 k9 E3 n( j$ V+ g: H. R - super(viewport)
- I4 H$ l l9 T - @enemy = enemy- ~2 t6 p7 U5 A1 N
- @battler = @enemy.battler. ~6 b- v: a/ D3 L9 n* ~' N
- @old_hp = 0
4 E9 {5 }- r1 l, Q& h3 f- n" k - @old_sp = 0
! B5 F! o; t4 {" j - @old_vis = false- O7 n( }7 ~, V6 \2 R K6 l$ y2 w0 | q
- self.bitmap = Bitmap.new(100, 100)
) {5 u& g' b2 G3 w' d9 y - self.visible = (VISIBLE_DEF)#false T4 W, Q0 X! f: s5 l1 Q$ z7 K0 ^
- self.z = 1006 [- `' o0 n& y! F' W# @, T
- #HP Border -------------------------------------------------------------------* w# ^% `2 N' t3 G
- @layout_image = RPG::Cache.windowskin("S_Border_HP_Meter")
* d! a5 q7 r; p - @layout_bitmap = Bitmap.new(@layout_image.width,@layout_image.height)
% q+ ?6 A5 ~# N - @layout_sprite = Sprite.new" J# o- d e" a
- @layout_sprite.bitmap = @layout_bitmap
) N: H( I2 o/ E6 P- j* S$ Y. X9 F - @layout_src_rect_back = Rect.new(0, 0,@layout_image.width, @layout_image.height)
$ I' Y; L1 U* c9 i% Z6 w; ~! _: J [ - @layout_bitmap.blt(0,0, @layout_image, @layout_src_rect_back)
4 w: H5 x1 Z: r# m7 x( p - @layout_sprite.z = 5001
% Q5 B. c& g$ o1 I - #HP Meter ---------------------------------------------------
" O! [: H3 d% k" h$ o - @hp_flow = 0! S2 P% }# a( a0 U h/ D/ F
- @hp_damage_flow = 0' O2 D( {; k/ w0 }* l
- @hp_image = RPG::Cache.windowskin("S_HP_Meter")' c% y. c. F" a7 }- C
- @hp_bitmap = Bitmap.new(@hp_image.width,@hp_image.height)
0 K% J! s# U w - @hp_range = @hp_image.width / 3
# ]3 f \# j; I - @hp_width = @hp_range * @battler.hp / @battler.maxhp $ D& h& |6 `+ Y3 U$ {
- @hp_width2 = @hp_range / 2
* ]. ?2 M5 X/ d4 C1 r( w - @hp_height = @hp_image.height / 2; i$ A5 Z, Q9 ^7 v# I* p, y
- @hp_width_old = @hp_width s- f6 Y: F! y: F0 p
- @hp_src_rect = Rect.new(@hp_range, 0, @hp_width, @hp_height)
" B$ I, d- c4 v+ m- A - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
. x$ k5 b8 Q4 _& C - @hp_sprite = Sprite.new
. y& v# M+ }# b - @hp_sprite.bitmap = @hp_bitmap
5 d5 B y" d5 N$ K - @hp_sprite.z = 5002
/ n" U" T _5 L. s" o - #SP Border -------------------------------------------------------------------: W9 d& c6 C+ J1 c0 t& l
- @layout2_image = RPG::Cache.windowskin("S_Border_SP_Meter")
3 b% V6 J+ B z" c - @layout2_bitmap = Bitmap.new(@layout2_image.width,@layout2_image.height)
9 L% f& r: D+ { - @layout2_sprite = Sprite.new7 a4 d8 {6 J$ A; F6 \* C
- @layout2_sprite.bitmap = @layout2_bitmap
3 j. F( ]# t1 `1 s - @layout2_src_rect_back = Rect.new(0, 0,@layout2_image.width, @layout2_image.height)
4 o: s5 _* K! x- d. E5 C& Z4 f" J - @layout2_bitmap.blt(0,0, @layout2_image, @layout2_src_rect_back)
* g+ ?& ]% @3 P+ P- ? - @layout2_sprite.z = 5001
/ }8 K+ {/ a7 E0 Q8 j - #SP Meter ------------------------------------------------------
" \4 a! k/ k/ S( g# x& o - @sp_flow = 04 g' o: R5 z! B$ D
- @sp_damage_flow = 0
9 Y& G) m* m6 m5 A - @sp_image = RPG::Cache.windowskin("S_SP_Meter")
% U8 e1 M/ s( l; m: l - @sp_bitmap = Bitmap.new(@sp_image.width,@sp_image.height)6 d o! b% z8 j& N" X
- @sp_range = @sp_image.width / 3
/ I9 A+ e) B$ u: w1 h# a - @sp_width = @sp_range * @battler.sp / @battler.maxsp ' o) c4 J" B9 u* x1 S" W& T# G
- @sp_width2 = @sp_range / 2/ i9 @) d" Q- b$ m
- @sp_height = @sp_image.height / 2
+ H7 N5 d, k% w6 S3 M - @sp_width_old = @sp_width2 d g c5 n6 ]2 y# ?* Q- f
- @sp_src_rect = Rect.new(@sp_range, 0, @sp_width, @sp_height)- @8 l Z/ A' h# ?
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect); F; x' }6 P/ F `8 B' ^
- @sp_sprite = Sprite.new" B& t& J: }# O: n6 b
- @sp_sprite.bitmap = @sp_bitmap% ?" q* F) V2 o: o/ ^$ \6 }. v
- @sp_sprite.z = 5002
; ]7 E+ t$ `( S) G+ g - update
3 \0 ]5 {, P: j7 ?0 h - end
0 M7 n; }+ x" D* f( X1 e0 m! a - #--------------------------------------------------------------------------+ N' o5 E! f& Y1 L
- # * Refresh2 z6 t3 A- Y% f- {+ Z: ?5 e
- #--------------------------------------------------------------------------
9 n8 v: M+ r! D0 g - def refresh
0 a @" w+ |3 O; }# l2 t6 R- \ - return if @old_hp == @battler.hp and @old_vis != self.visible
% N* I2 O6 d! ~# @! L2 F8 R$ ~, m - self.bitmap.clear1 U+ {+ k" G) j& ?1 q
- @old_vis = self.visible# }0 r. O/ Z6 \7 @8 j$ ~
- @old_sp = @battler.sp
( c0 x. _4 E6 B& ^ - @old_hp = @battler.hp
; G8 I1 \9 [2 Y% o0 p$ n; H - hp_flow_update0 U$ N; J1 J- C- I; z4 j2 n
- sp_flow_update3 O- l, c. ~) p G
- hud_pos_update
% v4 ~9 P6 ~4 A* o3 ^7 V/ \ - visible_update
- X) ^7 h: K3 s2 n+ L R' a - end
6 s6 M# S) E" v$ ^5 G - #--------------------------------------------------------------------------* V5 ^( }9 Q) R3 Q' F% e7 I
- # * Dispose' B K7 a: A( }
- #--------------------------------------------------------------------------
! L$ }3 u! K# `9 v( f s9 p( Z - def dispose/ f* s0 U |( `" H5 X$ X$ T
- #HP Meter Dispose
% I7 o8 q2 C- W - @hp_sprite.bitmap.dispose- ?+ R9 ?) b, L. e# i
- @hp_sprite.dispose
0 s( i& O1 N' @% P/ u - @hp_bitmap.dispose9 h3 i7 I5 O. r: ?; Z$ t
- #HP Border Dispose
! i! F ^7 r$ k* s6 t - @layout_sprite.bitmap.dispose
6 B5 o- ^. v' W# H; S - @layout_sprite.dispose
8 W5 r! Q4 h. u9 l8 j8 y8 N0 J - @layout_bitmap.dispose
- x" h$ I$ o1 r4 v2 a$ X7 F+ E% X - #SP Meter Dispose w/ A1 I. @7 k- Y
- @sp_sprite.bitmap.dispose9 I4 J' N. y8 `9 i/ A) }
- @sp_sprite.dispose$ J% m, p2 N' o
- @sp_bitmap.dispose* i q& n3 z! t7 M
- #SP Border Dispose
/ ]1 Q; a& M2 r& ] - @layout2_sprite.bitmap.dispose* y; R8 _8 L1 E8 |+ j |* I% C
- @layout2_sprite.dispose6 {" j7 W: A g* N3 y
- @layout2_bitmap.dispose/ A- `3 g; ?7 ^' s* Y
- end
- ^3 Z6 R, e! y: @; k1 P - #--------------------------------------------------------------------------5 A) Q, c& `2 F3 T5 M* A+ H
- # * Update' {8 u% Y5 E" A0 S& D
- #--------------------------------------------------------------------------
- e& q; T7 Z3 u* k7 W - def update3 M3 S! `5 e, j8 x5 Z. |
- @battler = @enemy.battler 4 Y* Q7 O, M, X$ x7 l6 V
- return dispose if @enemy.dead? or $game_map.events.values[@enemy.id].nil?
0 H- O, C6 X7 l* ? - if self.visible
4 u- W& J' g7 c, e - refresh
4 k" k6 a: A1 s5 j' H - else
" ~9 \% [9 Z- [8 s$ I, L - self.bitmap.clear
8 Y- M+ X5 E3 ]1 _& E1 U - end3 c: o6 h2 A4 C
- end
) T, q' u8 r9 @# X i - #--------------------------------------------------------------------------
/ e: `! f/ K" P9 `. }) q - # * Visible Update1 b u, G2 p: I U& K1 B9 j
- #--------------------------------------------------------------------------0 H* Q' B9 V# E2 Z; e. ~
- def visible_update7 Z$ R: C" K: z6 z3 S5 [6 [
- if $game_switches[MOG::DISABLE_SHUD_SWITCH] == true$ ]6 g8 n1 w# h, {
- @hp_sprite.visible = false- g$ j& S" F A5 V' q+ [
- @layout_sprite.visible = false& @6 i* W$ z; W& |' y) J# n
- @sp_sprite.visible = false
: a: E! i4 [7 p( s$ i# \ - @layout2_sprite.visible = false
0 b( K, V' V: [0 y8 T" c - else2 @% s$ T. n- G: v! T2 u) W, a
- if HP_HUD == true
5 g( N8 a& X2 S1 a2 B: W$ P& z - @hp_sprite.visible = true1 O0 V4 g- |# \7 M" @- e
- @layout_sprite.visible = true7 J3 b( m( {5 t
- else
- K) w' @, V r - @hp_sprite.visible = false- C9 Q' Z& o% y$ x# O
- @layout_sprite.visible = false
2 \% j8 W, ^/ X- S - end ) m* A: w4 V, }, X% b* N: s$ ]& p
- if SP_HUD == true3 u% g9 }* n# E* C$ _! _' J4 E
- @sp_sprite.visible = true
5 `2 [8 U6 l8 v& w - @layout2_sprite.visible = true
- k! o/ B- s7 o8 y$ l6 F" \ - else
( q, q3 g+ Y! P6 } - @sp_sprite.visible = false
4 E0 b# M4 A3 B9 I; I; A( O* d2 T - @layout2_sprite.visible = false
/ t& `; \) o/ W& M o- v% Z - end ! c' n# ~6 `# g4 b/ g
- end ) A& d. ~' M3 c& }: j' I$ d* B
- end 0 L' w/ S) M( d# x4 B& _6 }
- #--------------------------------------------------------------------------
/ y; v+ i% @* F2 R' K) a - # * Hud Pos Update
4 [. e; S& R5 t J2 x% S - #--------------------------------------------------------------------------
7 `2 D0 Q6 ^- R1 }: y5 Q - def hud_pos_update
; t8 G+ ~4 f2 V; U; p, R3 E - @hp_sprite.x = self.x - @hp_width2 + S_HP_METER_X
# F. A6 ? G; C8 ~: C4 g - @hp_sprite.y = self.y + S_HP_METER_Y 6 v9 O, g" D( b, R' a
- @layout_sprite.x = self.x - @hp_width2 + S_BORDER_HP_METER_X
0 J2 m, x; v/ g9 _) E; `; f - @layout_sprite.y = self.y + S_BORDER_HP_METER_Y / \% C- E. ~- x0 {
- @sp_sprite.x = self.x - @sp_width2 + S_SP_METER_X
2 V6 r! c; z2 ]2 ^3 ?7 ^$ p - @sp_sprite.y = self.y + S_SP_METER_Y 3 J! b7 k# m3 x) }& O" B. g0 k
- @layout2_sprite.x = self.x - @sp_width2 + S_BORDER_SP_METER_X
, i7 j5 _6 c' ]5 x7 k; a% v - @layout2_sprite.y = self.y + S_BORDER_SP_METER_Y
- d, Z) d. ^, E% G- h - end 1 q% L5 r% c2 q+ T2 X" O; W
- #--------------------------------------------------------------------------
) c! K0 c1 }0 t! d; O$ z0 W+ r. S+ A - # * Hp Flow Update
4 S E( z+ h0 h7 `, A$ l - #--------------------------------------------------------------------------. @" q( s# o: R
- def hp_flow_update; m2 Z( e2 s) j% h% w, i
- @hp_sprite.bitmap.clear( ?! x. \: R/ z1 _. b6 I/ B
- @hp_width = @hp_range * @battler.hp / @battler.maxhp
6 Q) y4 U, K. W6 U8 R9 s- p - #HP Damage---------------------------------2 J2 M' v. r- L, i' }8 I
- valor = (@hp_width_old - @hp_width) * 3 / 100' g" T5 C0 b0 Q8 B, g9 q5 ]
- valor = 0.5 if valor < 1 I+ e7 [2 j3 g( `, j) P
- if @hp_width_old != @hp_width
' _* @0 O. K3 H) Z) d. D, ` - @hp_width_old -= valor if @hp_width_old > @hp_width 8 A3 i3 ?! r1 o7 J
- if @hp_width_old < @hp_width 4 |) T' f& ^+ t2 k( c& c- i1 F4 m
- @hp_width_old = @hp_width
/ Q& `( o$ ?! u+ z6 N/ J4 K - end
* ~2 P0 v# p6 r+ j - @hp_src_rect_old = Rect.new(@hp_flow, @hp_height,@hp_width_old, @hp_height)
* J3 _+ D5 `$ s8 r/ Y. c - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect_old) % Y; i8 J7 z- D1 P1 w
- end % G: F% N* R. _% h" k
- #HP Real------------------------------------9 d/ X# A( N6 O4 T
- @hp_src_rect = Rect.new(@hp_flow, 0,@hp_width, @hp_height)
6 ] l" h5 D5 H+ F4 E' f ~# ? - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect) & A* h# E |# `' _* |
- @hp_flow += 2
4 B6 c; K7 I- }0 h4 o - if @hp_flow >= @hp_image.width - @hp_range
. o* _+ Z) g/ u - @hp_flow = 0
a4 U2 p+ D4 X# c2 l8 {9 u& P - end, L- N) L3 A0 |1 P7 d: {; {
- end
9 Q* k% C0 g. @ - #--------------------------------------------------------------------------0 E8 y$ T# v4 V8 P% R
- # * Sp Flow Update+ w9 N! x* Y1 Q; _4 D5 M9 E0 W' K! m
- #--------------------------------------------------------------------------/ x1 V( k' V4 {# b# N
- def sp_flow_update' b, ?8 k9 ]! t- e- E
- @sp_sprite.bitmap.clear7 H1 {/ D: M- e+ A# m" P
- @sp_width = @sp_range * @battler.sp / @battler.maxsp
. E$ G- P- k$ _! H3 W, J7 j { - #SP Damage---------------------------------4 h6 J D, s, o; x# {0 @
- if @sp_width_old != @sp_width) z! o/ D: S, b; x+ u0 W* c: s( t
- valor = (@sp_width_old - @sp_width) * 3 / 100
! S1 h2 [8 R6 ~" @$ {- _/ h - valor = 0.5 if valor < 1 - R( u7 l& l; \8 `1 F
- @sp_width_old -= valor if @sp_width_old > @sp_width
; L' L/ |/ c& g" u - if @sp_width_old < @sp_width
/ a) z2 L/ \: L' n7 x5 d6 j0 | - @sp_width_old = @sp_width
/ H, Q0 e$ V3 g$ {8 k - end 8 Y+ x# ?# ?! b+ c" X
- @sp_src_rect_old = Rect.new(@sp_flow, @sp_height,@sp_width_old, @sp_height)
; B. O; {! `5 T. r/ \( u7 C - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect_old) e5 @/ z2 L5 s" G/ @& X
- end
* Q! y: c3 N; [: [, Q$ M( ] - #SP Real------------------------------------
+ y4 M/ A3 ~$ y& Q8 u @ - @sp_src_rect = Rect.new(@sp_flow, 0,@sp_width, @sp_height)
% C0 z5 ~6 U" r6 G; w - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect): i0 G3 j/ } t; o8 P" k
- @sp_flow += 1 % p! O6 R+ q n) r0 H
- if @sp_flow >= @sp_image.width - @sp_range
. L) u. U2 U) J8 D - @sp_flow = 0
) w, m0 U, `& e, E - end; y% O& C) H4 S
- end 0 b% z# }- M2 H. l
- end) p% G; \ T u7 R: @! a
- #===============================================================================
! @3 p5 U& t- `+ O - class Sprite_Character < RPG::Sprite
2 F/ ?3 p4 d' E8 R! X% w - #-------------------------------------------------------------------------------4 y/ V5 J. k& p* ]$ B6 w
- alias :xas_emini_hud_init :initialize# n, v, t! Q3 m* n' b* T1 z
- include MOG* w. \! q* v+ N1 B5 t7 W' A4 @" G) E& Z
- def initialize(viewport, character)
0 m* e6 L) N2 J% G8 Z - xas_emini_hud_init(viewport, character), J$ j1 y. P( A' o" w8 S6 B
- @viewport = viewport
8 {; |+ Z2 ~4 [2 y0 h - return if @character.battler.nil?4 i/ w$ h/ H8 X: u8 J
- return if XAS_BA_ENEMY::ENEMY_OBJECT.include?(@character.battler.id)
- _8 b5 W/ X' K+ {$ B0 P9 _; H) Q - return if XAS_BA_ENEMY::ITEM_ENEMY.include?(@character.battler.id)
, o' C; z$ \# j( k6 Y. e - return if @character.battler.is_a?(Game_Actor)$ Z1 Y8 Y: b. A/ |4 R
- @bars = S_Hud.new(@character, @viewport)
1 H6 ^# \( N2 y! C - end
& ~4 [; g2 S% M! a: v& _ - #-------------------------------------------------------------------------------
/ C( y$ }6 B* y( X& a$ ] - alias :xas_emini_hud_up :update
( S% L- g6 f! g/ M! ^1 R - def update
- N, k' ?5 i* n - xas_emini_hud_up
/ P- o- F9 O) Y6 A9 u- {7 @' | - return if @bars.nil?% V4 I. l! l+ h
- return if @bars.disposed?
; O% a9 C0 b4 r5 U n- ~$ ] - dis = ($game_player.x - @character.x).abs + ($game_player.y - @character.y).abs' S" S: L8 i( _+ L F+ q7 ?
- @bars.visible = (dis <= RANGE)
& k% m2 t" l- h+ T, t2 | - if @bars.visible
5 J' K$ ~) B/ \ - @bars.x = @character.screen_x# - @cw / 4
9 ~3 @% [; O4 k+ F5 ^( W, M - @bars.y = @character.screen_y# - @ch / 4
, V. B- L4 h4 }* D+ r- h6 I: x - end8 ~' N! J9 X1 N- L% _7 @
- @bars.update8 T' I3 F5 I4 f9 t
- end& z! Y& W" I3 _' i- C
- #------------------------------------------------------------------------------- k/ U! C- V1 G
- def dispose) U& U6 t# L/ l' I" L
- super
2 U+ H/ ^, ]# O5 U - @bars.dispose if [email protected]?' F$ B( }, _- k4 v; G- S& D2 b
- end; u. P- S" W! _8 P1 p/ X
- end4 s* K9 f3 [$ @2 W+ V9 s0 u
- 0 B- N; @9 E4 W* ~* g
- $mog_rgss_s_hud = true
复制代码
: y. j W/ Y* Y0 |* I3 F
6 q1 w/ V/ w5 L/ g7 ~8 W
" E7 s% N1 M4 s% E7 Q0 P2 U3 Q上面所說出錯的203行內容為
- Q, S4 @; V0 M' r+ T@hp_sprite.bitmap.clear4 k- Y6 u* {$ X% a
0 V: u* u9 f: e N) X想知道怎麼解決" m/ G4 r! |# u2 o- ~% y ?
' U i) n+ U, [& a \& f" h$ v
該腳本支持3.821 z# T7 J2 q" @: E
. V0 h1 k+ ] r! I: A下面是圖檔,要塞在Windowskin下
1 r, }) [' A- D4 z9 C' _ H7 p* l
+ P) _% B) f) }2 m
S_HUD_Graphic.rar
(12.36 KB, 下载次数: 49)
8 j3 R! X) Y3 b+ q4 {. Y
% Z( `: P- Z/ E" a$ |; ]' b. ^ ?
1 y' ]8 W) @+ _: Y4 Y
( V# b; l0 C1 S0 |7 l+ W' A! j |
|