赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 1 |
经验 | 31761 |
最后登录 | 2024-8-20 |
在线时间 | 1740 小时 |
- 梦石
- 0
- 星屑
- 122
- 在线时间
- 1740 小时
- 注册时间
- 2009-7-12
- 帖子
- 443
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
這是我將官網的S_HUD修該而成的怪物血條
K5 U4 E" W j% T會在每隻事件怪物的腳下顯示
5 `: M; D* R# ?; u問題是不知道為什麼# |, z0 \' I, M8 W7 k" e5 V
有時打怪打一打會跳出1 g. G0 k0 f8 J4 w/ X. G7 @' B: `
---------------------------
7 F" o" ]1 u3 K4 b. ]XAS ^. ^ ]* }, U1 |3 w/ J
---------------------------' T- Q$ g) p+ Q5 R- a7 u1 g& `- }
脚本 'MOG - S HUD' 的 203 行 发生了 RGSSError。7 w q: ?' K C+ k/ v# w
/ I9 R9 }. U) i7 _9 Tdisposed bitmap
_. R) r4 \" Q' f/ _2 [6 v---------------------------
6 m# R: |: J- d3 y6 ?) {/ i; Y2 R6 c確定
( e5 }" ~5 a. J! i- P4 `$ t---------------------------1 o) V. W3 M8 w3 K: Z4 {. i
+ }, [3 g; V0 v7 E) Q) U5 L4 S這是腳本
! Y1 n$ I: ^9 X( J+ R5 s( T2 w& u3 l; d3 k
- #===============================================================================
5 V7 B0 P4 w* C2 v; E: z4 c5 b) X - # MOG - s Hud 1.0 2 R7 l/ v" N) F" B- f
- #===============================================================================
& D4 z2 @6 V& v$ O9 z5 L - # By Moghunter - X( X) m$ k1 q6 G$ J
- # http://www.atelier-rgss.com6 c+ i f& K/ y+ F: f- D" m
- #===============================================================================1 U: T: Y. T* X% m1 t
- # Translated by Calvin624 6 l' ^! \# m$ U6 K( M7 M4 ^/ L
- # http://www.xasabs.wordpress.com0 Q7 v$ _- L, h# }7 P) |
- #===============================================================================
2 M+ ^6 \, W4 ~, v" t: W* R - ###############################-DESCRIPTION-####################################
9 k2 a. v8 ?4 S! v - #===============================================================================+ [3 G1 ^4 k# K- G( @) {+ Z
- # Personal HUD – displays the HP and SP below the hero.+ j. p. }; Z9 Y4 H
- #===============================================================================/ F, g* q9 p; t
- #
0 O" F3 |( R# A1 [; e - # Graphics required:
6 c* o5 F4 V: G. K. D - # 7 o( v7 r3 R& @' w
- # S_Border_HP_Meter.png
3 i7 E1 G* Y3 ]8 k/ x - # S_Border_SP_Meter.png$ \* v4 M7 u3 P1 y& v
- # S_HP_Meter.png5 h s4 Y) p% e! o% s0 v6 K# L4 Y( @
- # S_SP_Meter.png
- c- y$ X! G. ]: H+ s7 V2 `- {' p* b3 B" i ? - #; {0 V1 N/ Z# `8 R
- # All images must be in the Windowskin folder.
: S, A) @* o' @' \8 a. F) c0 a - #3 h m: C$ V# x4 D& Q. l, Q- K7 U
- #===============================================================================
/ E5 a! w5 {4 J N; c1 J7 c. ` - module MOG* K, G2 M% ?# M' d8 q
- VISIBLE_DEF = false
# s, x y+ z6 m5 Y( P# J0 F, ? - # Show HP meter?
: Q! V2 v* |2 e8 F - HP_HUD = true
' K$ a2 E+ ]! F, j2 v U - # Position of the HP border% n4 D% D; ~9 ?- W6 {# U4 U+ p
- S_BORDER_HP_METER_X = -2
5 Y$ b. g* j4 m# k# X2 y: F8 w) z7 h3 V - S_BORDER_HP_METER_Y = -2 9 n: ^0 m! D5 [3 Q5 v
- # Position of the HP meter. K7 ~ G# _. r- e
- S_HP_METER_X = 0- D! x0 J( ]8 Y u/ t6 ]& @2 O
- S_HP_METER_Y = 0
% i7 X7 s" k* U: ~: r6 S# v4 g - # Show SP meter?
' v0 C$ r3 J2 M' d - SP_HUD = true
; \( i' {: n( e; l2 w - # Position of the SP border# U; s4 e, e# ^6 B# u2 q
- S_BORDER_SP_METER_X = 0
2 w( ^4 ` }0 H% o( s, O - S_BORDER_SP_METER_Y = 10 0 Q5 J' ^$ o' _/ }) c/ p& ^
- # Position of the SP meter
% w7 A' f( c( u( V - S_SP_METER_X = 0' ~( Z: L3 _$ H8 e% g8 v9 Z
- S_SP_METER_Y = 10
4 e; ]' }/ i3 e - # Switch to disable the HUD2 e% R) F, }/ p: l: Q5 c" C
- DISABLE_SHUD_SWITCH = 5
2 q0 p! L/ Q n' g8 | - RANGE = 20
. p0 ]8 { A3 O - end
/ f. S1 v8 J" B5 I# |/ y, R" j" x5 T - #===============================================================================" I: V: Q' v& T9 \: l% [
- # S Hud/ |. H$ C) _2 d% R
- #===============================================================================* t. _* V, w4 V# V% E
- class S_Hud < RPG::Sprite
( v& I8 M. i$ n1 D - include MOG/ Z* L" F) ^; A2 I+ ?9 b
- #--------------------------------------------------------------------------& A+ E# a# h9 f2 n
- # * Initialize! F& P( t/ Q" `
- #--------------------------------------------------------------------------$ y; w* K3 o- o+ n1 x% M, _8 n
- def initialize(enemy,viewport)
) a! [7 V% _* y# Z4 O6 q& D* R8 A - super(viewport) 5 k; P" N) r# y( z/ F$ q9 \
- @enemy = enemy; h7 A* |# O$ @) }6 }3 E3 S
- @battler = @enemy.battler
/ m# K/ {, D; _, J8 I9 V - @old_hp = 0. B0 h4 Q9 `$ |0 y. b, y# I
- @old_sp = 0% L9 C( C/ M% p6 m" z. n
- @old_vis = false7 x+ j0 S! O' |$ E; \. _# x
- self.bitmap = Bitmap.new(100, 100)
# G8 K' ^# \2 T9 L0 z" P - self.visible = (VISIBLE_DEF)#false
+ \) O0 q2 ?" v4 R4 o! k" T, ` - self.z = 1002 n9 Z+ d* e; J) e
- #HP Border -------------------------------------------------------------------2 e: Q8 V$ U3 F1 M. n
- @layout_image = RPG::Cache.windowskin("S_Border_HP_Meter")
0 H: A- ?! B3 V1 Q! g: q+ k - @layout_bitmap = Bitmap.new(@layout_image.width,@layout_image.height)% o3 e; W/ B, X# e
- @layout_sprite = Sprite.new
$ G* O) p; z& x1 K* \/ X/ E - @layout_sprite.bitmap = @layout_bitmap
6 U8 ^; J! D; c9 m& F d8 q+ | - @layout_src_rect_back = Rect.new(0, 0,@layout_image.width, @layout_image.height)
$ u# c, b: g, y" l - @layout_bitmap.blt(0,0, @layout_image, @layout_src_rect_back)
! Z2 [& n4 l& h' m# d' [ - @layout_sprite.z = 5001; D4 V* ]4 p% _+ L1 T; Y% J* r8 @8 |
- #HP Meter ---------------------------------------------------2 I. M8 K C# [2 \
- @hp_flow = 0. l) |% L1 V6 ^ d1 @$ y3 a5 c& e
- @hp_damage_flow = 0
L" E& ~, `: p4 i* w. j* ~0 p8 J - @hp_image = RPG::Cache.windowskin("S_HP_Meter")- c( A! Q6 T3 C3 N+ [3 a9 S, e
- @hp_bitmap = Bitmap.new(@hp_image.width,@hp_image.height) x1 M: t4 @6 N# x( l) {8 C
- @hp_range = @hp_image.width / 3
& ^+ q( \4 q) o - @hp_width = @hp_range * @battler.hp / @battler.maxhp
- O9 H( B0 O9 G+ n K# F - @hp_width2 = @hp_range / 2: q' Y* o1 c2 f6 f( Q8 L
- @hp_height = @hp_image.height / 2
' H6 Y0 D1 q# q& r - @hp_width_old = @hp_width. X+ {+ D" E' z) z5 n; [% J* v
- @hp_src_rect = Rect.new(@hp_range, 0, @hp_width, @hp_height)
5 T$ a4 O9 ^7 i: w9 \ - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
1 C0 k: }' {* z% K* s5 I+ r - @hp_sprite = Sprite.new
2 ^7 O, c! n/ ~! C - @hp_sprite.bitmap = @hp_bitmap# I) Q9 {2 n. n
- @hp_sprite.z = 5002
: t5 {; L* F0 t9 X- T6 Z - #SP Border -------------------------------------------------------------------
/ i+ v4 S& p! l, N - @layout2_image = RPG::Cache.windowskin("S_Border_SP_Meter"); W; X4 O I8 n8 I$ m
- @layout2_bitmap = Bitmap.new(@layout2_image.width,@layout2_image.height)6 n7 g$ a: L, ?8 z! `/ k# ]. e5 n
- @layout2_sprite = Sprite.new3 N5 r4 p3 \+ \2 C+ p
- @layout2_sprite.bitmap = @layout2_bitmap
$ x! S9 \6 f' b; h+ h) b$ _ - @layout2_src_rect_back = Rect.new(0, 0,@layout2_image.width, @layout2_image.height)
* ~! s) q: U9 R9 d) \0 S* Q - @layout2_bitmap.blt(0,0, @layout2_image, @layout2_src_rect_back)
$ A+ |+ M5 |1 N$ J, c - @layout2_sprite.z = 5001 ; B2 p+ t- r( X+ a; ]
- #SP Meter ------------------------------------------------------+ j+ k9 B$ d/ H) R/ P0 D' w/ c
- @sp_flow = 0" t U% T+ k& i0 ]. i" u5 ^0 M4 }
- @sp_damage_flow = 0; N* B6 ]. t" j5 R9 y/ A
- @sp_image = RPG::Cache.windowskin("S_SP_Meter")
! l1 g k8 K: p" r- [' _ - @sp_bitmap = Bitmap.new(@sp_image.width,@sp_image.height)) _& S W8 @( p6 L/ ?2 ]- |
- @sp_range = @sp_image.width / 3# c, g8 d8 ]& j2 P" ~. }9 v" W' X
- @sp_width = @sp_range * @battler.sp / @battler.maxsp
, o1 r' W$ W! ` - @sp_width2 = @sp_range / 2
9 K/ j9 h4 p6 W. O/ C - @sp_height = @sp_image.height / 2. J; v' r) d0 u2 ^
- @sp_width_old = @sp_width, D! y, t* J) D" Q" d8 l6 a( i3 v
- @sp_src_rect = Rect.new(@sp_range, 0, @sp_width, @sp_height). N' s7 D8 ]3 n- U# v9 y
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)
* O/ d' X6 U, `* [! x* Z7 j; j - @sp_sprite = Sprite.new9 a: {9 K0 I2 H! Y0 v7 c' i
- @sp_sprite.bitmap = @sp_bitmap
1 Q# q; Q# S# l0 t - @sp_sprite.z = 50025 p% M4 t: B9 z$ ^
- update6 y. a. L( r3 W. L
- end/ ~' h* P/ {6 D5 k$ U! I
- #--------------------------------------------------------------------------
9 V( U0 C% W" J2 p - # * Refresh
; E% ?& p7 i- Z - #--------------------------------------------------------------------------
0 ?# L) Z& b3 a - def refresh4 w) A' a/ _( o2 @, \) J
- return if @old_hp == @battler.hp and @old_vis != self.visible
* t$ ]9 a+ B! A - self.bitmap.clear
/ @$ H2 J* Z6 ^! r - @old_vis = self.visible
}' O; z, N' V( p/ X: @0 L - @old_sp = @battler.sp
% s3 w% s& N( g! f# P' M - @old_hp = @battler.hp
& }- X; D7 ^5 O; z4 N6 N/ f# M - hp_flow_update
6 z' F( L3 i" h) h - sp_flow_update K4 H1 C( w( Q) c
- hud_pos_update7 M5 i/ V* U) J; C" }4 N) [5 L8 s
- visible_update1 ~1 ~) |3 ~; k3 `" ^, G' B
- end
) e6 s/ |" ^! {0 K& N/ K+ x. w4 l1 R - #--------------------------------------------------------------------------, v1 g% @) F) I" n, M
- # * Dispose
; M' E- X# o3 `9 P; {" u - #--------------------------------------------------------------------------+ h0 f6 a, i% C4 B# U( f# _
- def dispose4 g+ x- Y* ~' C n
- #HP Meter Dispose1 U. C" }$ k5 [7 D8 v
- @hp_sprite.bitmap.dispose3 @- C! S% L- Q7 f; o' a4 U, R
- @hp_sprite.dispose6 l. O+ |9 y: ]+ Z5 h9 C2 I4 g3 Y
- @hp_bitmap.dispose! N/ G t0 u& o" c; y1 D2 l
- #HP Border Dispose
3 V' d# v; I9 M* e+ @: ~* B - @layout_sprite.bitmap.dispose
3 N3 X+ }( l/ y3 `9 i - @layout_sprite.dispose
, D% s3 K7 v! h+ |3 b. H/ } - @layout_bitmap.dispose& M; {9 f; I) v! o: R
- #SP Meter Dispose
" Y, U5 l6 g _, t: f. i7 t0 Z; e4 } - @sp_sprite.bitmap.dispose( V5 Y$ K/ c' L
- @sp_sprite.dispose
/ G! i& ?: e8 V Z. g( C7 \6 g - @sp_bitmap.dispose F* D J2 w5 }+ k T) f
- #SP Border Dispose7 b" L5 c! {/ n, C
- @layout2_sprite.bitmap.dispose6 d" P8 x+ j; T& W# }0 |( w
- @layout2_sprite.dispose+ H( z/ p3 }, c R, @/ V- a
- @layout2_bitmap.dispose; H1 V9 a6 l; V! H; u
- end4 ?" ]$ _# { X7 M- C; d9 f' Y) V9 C
- #-------------------------------------------------------------------------- u* E. Z1 N' t7 r: a
- # * Update
* P @9 s* k7 a8 _ - #--------------------------------------------------------------------------/ w/ N I) Q2 f+ U# @+ n& T
- def update3 N% g% E3 P' q3 G5 O& E9 A8 p
- @battler = @enemy.battler + |( l- d* I" D3 j/ b% ^$ w
- return dispose if @enemy.dead? or $game_map.events.values[@enemy.id].nil?
/ }2 _) I: G0 l4 h - if self.visible
, a, {: ^% C! A) W" y - refresh2 S4 W& q0 L/ U2 v: K
- else
, I4 h! Z- z3 Z0 g' {0 V7 W/ o - self.bitmap.clear2 ^& T; R2 {* h* B' f6 ^1 d
- end2 ?7 A0 o8 N% \' ]' u. p0 m
- end/ n& M; e) Q& K2 ^
- #--------------------------------------------------------------------------6 R- r& }% _/ y; k
- # * Visible Update
4 d6 }( F" F* n* d - #--------------------------------------------------------------------------
8 D' s# P4 g4 ~* X Z. t* R - def visible_update; v2 v7 x i& ^4 H) N( @; K
- if $game_switches[MOG::DISABLE_SHUD_SWITCH] == true
& y- b* a0 I* h# t: D - @hp_sprite.visible = false
) q2 O% f% W, h" J - @layout_sprite.visible = false
- j* c0 ]9 Q+ G. Q9 V; O - @sp_sprite.visible = false) @! o7 Q6 S" V# _5 g7 f' _
- @layout2_sprite.visible = false
; e9 Z1 x1 m3 a; I2 s) Y: f8 e - else, d J" `8 i$ {5 @! q( r# [
- if HP_HUD == true! A7 a9 W- ]6 D* o1 z( h6 _
- @hp_sprite.visible = true
' X0 e1 C2 [8 T1 M* c - @layout_sprite.visible = true/ L1 ?- i0 l, P1 b9 `8 {
- else
3 _& A# {: z- L. |6 `) Z2 } - @hp_sprite.visible = false
$ _3 F+ s6 V B! s- d2 _" Y - @layout_sprite.visible = false
" l F X! ?2 F0 C, T - end + F6 H+ R% [5 r2 U2 i& w
- if SP_HUD == true+ `! m) r) k" T k
- @sp_sprite.visible = true' {3 {* N- m& s# E3 a
- @layout2_sprite.visible = true0 ?6 w: P8 J7 Y3 v$ Y: q
- else7 U, u& @' @- @" v" Z* M; X- Y
- @sp_sprite.visible = false" ?4 G1 D) @: Y+ N) e4 Y$ d0 {
- @layout2_sprite.visible = false
7 d: W5 g: S! z/ K; b7 C O# \4 a - end
4 l2 d2 a/ \- S0 {" { - end * O, N, b4 y+ H
- end
/ w( K. o' Q& s; p$ |7 F0 G9 M6 [ - #--------------------------------------------------------------------------& s; ^4 k3 d3 P( n" B8 a
- # * Hud Pos Update q0 j: \, E& d5 b4 \2 i- ]
- #--------------------------------------------------------------------------. H' Y/ m; q" h" Q) n& t
- def hud_pos_update
7 g# t' ^+ A/ i0 P. O u& P - @hp_sprite.x = self.x - @hp_width2 + S_HP_METER_X# R+ X( M; Q& m* s. ^8 Y" I/ }4 a
- @hp_sprite.y = self.y + S_HP_METER_Y " K% e' G7 @: p
- @layout_sprite.x = self.x - @hp_width2 + S_BORDER_HP_METER_X- i: {: j$ A/ z* K* i+ |) m @
- @layout_sprite.y = self.y + S_BORDER_HP_METER_Y
( ?0 \* ~- Z0 E+ _/ z. n - @sp_sprite.x = self.x - @sp_width2 + S_SP_METER_X
/ K" s- f6 w: i$ S& ? - @sp_sprite.y = self.y + S_SP_METER_Y
8 m e- }7 n1 n& {" Q - @layout2_sprite.x = self.x - @sp_width2 + S_BORDER_SP_METER_X. k: Q. u# s) E4 }- Y8 V$ z# M
- @layout2_sprite.y = self.y + S_BORDER_SP_METER_Y
1 j; m6 o$ y7 X# I - end
( A9 H- e& i6 N- ~ - #--------------------------------------------------------------------------! s% z3 k# \' I& f- a8 k0 x
- # * Hp Flow Update
2 G% O* `+ |3 \4 K5 l8 |+ O - #--------------------------------------------------------------------------8 V4 F. w. I* t3 G. ~& m" [! O9 Q
- def hp_flow_update( t8 i$ t6 D" {; s/ w u. U2 i
- @hp_sprite.bitmap.clear
! F- t/ a9 ^# y/ \) N - @hp_width = @hp_range * @battler.hp / @battler.maxhp . O) \! Y2 q6 m f n
- #HP Damage---------------------------------
E9 l+ G* j8 @2 h% s. x8 A. L - valor = (@hp_width_old - @hp_width) * 3 / 1009 Q+ K" y: k8 e$ ~6 a8 `
- valor = 0.5 if valor < 1
) ]3 z7 N( q- t2 c - if @hp_width_old != @hp_width
9 p" l( W1 j0 w- o$ X# g; o - @hp_width_old -= valor if @hp_width_old > @hp_width 1 d5 m' {* v0 l7 a( t8 w! N
- if @hp_width_old < @hp_width
; J9 L" z' p6 h6 _9 Z/ a - @hp_width_old = @hp_width
; \( }$ m2 k( g5 e3 w - end 4 w* A, Z- U9 Z0 F0 O
- @hp_src_rect_old = Rect.new(@hp_flow, @hp_height,@hp_width_old, @hp_height)
0 C" z% y+ \4 K# P5 n+ r: @% i - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect_old)
) s: L2 y4 w: M6 B0 V7 h* J1 Z - end 2 K1 o; J1 ?. f7 W8 E
- #HP Real------------------------------------
$ C/ B2 u1 Q$ f* _3 f" x - @hp_src_rect = Rect.new(@hp_flow, 0,@hp_width, @hp_height)3 V" w) E( C2 g2 i, m) r |
- @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
: N4 E* S6 I3 y, K0 V1 y3 w5 f - @hp_flow += 2 / M: n3 f# _& m! ]* |4 Y7 N* ? A
- if @hp_flow >= @hp_image.width - @hp_range
" Y; H+ C& v8 J/ H) B - @hp_flow = 0
$ G# L+ |& u S* Q6 T( g - end4 K) w3 k0 E9 z5 {
- end ) y- P2 g0 P, l2 f
- #--------------------------------------------------------------------------2 \# [+ m' y4 t* v( C- X( m, m
- # * Sp Flow Update A5 h& e7 e# \' C9 c2 K8 ?
- #--------------------------------------------------------------------------
0 Z$ O. U) n' j! L; {# B - def sp_flow_update
) `0 h% @$ g z& {0 A - @sp_sprite.bitmap.clear
3 p1 a9 z- ] D( c/ _ - @sp_width = @sp_range * @battler.sp / @battler.maxsp I# e W& U3 h
- #SP Damage---------------------------------# }: Y6 E: M! U/ I5 W
- if @sp_width_old != @sp_width& P Z: F8 X& L) F6 k* \
- valor = (@sp_width_old - @sp_width) * 3 / 100
+ s# h _6 O6 _! Y# ` - valor = 0.5 if valor < 1
t6 G3 y9 h* k( M! X - @sp_width_old -= valor if @sp_width_old > @sp_width
* n2 F0 @. A- E% i8 m - if @sp_width_old < @sp_width
# {& d: d3 W% _; V' ^ - @sp_width_old = @sp_width7 c/ T" s4 w/ ^" ^* K! e+ M# {
- end
+ e' M. O9 j4 v' t# i - @sp_src_rect_old = Rect.new(@sp_flow, @sp_height,@sp_width_old, @sp_height)
* C8 R2 z R5 R, c2 m6 F d: u - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect_old) 3 w6 x* M# N+ h2 t& c
- end
& w: U5 Z/ z9 t" y( a( }0 F" n - #SP Real------------------------------------
# b# X- D/ T( N. n p* f - @sp_src_rect = Rect.new(@sp_flow, 0,@sp_width, @sp_height)3 B$ g8 H, ?: X) J- D5 |
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)1 h( v9 G1 f l- v
- @sp_flow += 1 1 {7 B1 D$ c: R8 X$ R6 T
- if @sp_flow >= @sp_image.width - @sp_range7 x$ H, B" \) `# R" ]
- @sp_flow = 0 $ \3 X' u: n4 Q" t0 r2 V! K& H
- end7 t' L- W' v9 q; I% W
- end ) V: N2 w6 X; u8 `+ v5 \
- end
5 }- O3 x3 }# P( q; O+ t1 D$ U - #===============================================================================1 E1 j5 Y. \3 g' A8 T; ?5 f8 e
- class Sprite_Character < RPG::Sprite
; R/ o5 G: V* g+ K' A" h9 ? - #-------------------------------------------------------------------------------
1 O6 M& y; H* e+ f9 ^6 d. ] - alias :xas_emini_hud_init :initialize
- v+ _' |# J0 v. [) E0 ^' y - include MOG/ F( y9 r3 Y: b. |1 l
- def initialize(viewport, character)+ X2 H6 _, N2 Y& x6 ~- N3 E
- xas_emini_hud_init(viewport, character)( H$ W& K1 k3 J/ K3 T
- @viewport = viewport7 @4 z% U: r2 [5 u5 U0 b
- return if @character.battler.nil?
2 ]& S( h( M/ \, `# a - return if XAS_BA_ENEMY::ENEMY_OBJECT.include?(@character.battler.id)
c |) u3 y" k1 |: [' n( Q/ s, P - return if XAS_BA_ENEMY::ITEM_ENEMY.include?(@character.battler.id)
. N9 T' x( g) _& h7 _2 m6 |4 U# z - return if @character.battler.is_a?(Game_Actor)- h8 j3 Y1 p9 _( `+ \' c
- @bars = S_Hud.new(@character, @viewport)
" M# v4 w* j) d, n0 X5 S5 P" G3 b - end
& j4 T: c. d$ ~ T# a - #-------------------------------------------------------------------------------2 u( @; Z! h: E9 f
- alias :xas_emini_hud_up :update7 E9 c# V" b) W, a
- def update
2 R, A' V' M! Z9 ~, ` - xas_emini_hud_up
9 B0 c8 X; U: _& q5 j8 c2 ` - return if @bars.nil?
4 m& R" s3 g4 {5 a: g; z" J - return if @bars.disposed?
5 W% w: O6 E. l: {& S - dis = ($game_player.x - @character.x).abs + ($game_player.y - @character.y).abs. W) \/ h- w5 L2 S
- @bars.visible = (dis <= RANGE)5 `* M4 u% [! N3 g6 B7 D8 y( s3 q
- if @bars.visible
+ `: F" r0 n" H# j# i - @bars.x = @character.screen_x# - @cw / 4
, a0 C; c8 Q3 C% C1 n - @bars.y = @character.screen_y# - @ch / 4- [2 U" ~ C' D5 x2 d0 M& s* z' n
- end
6 e) C$ n% v) ?8 C - @bars.update
: L4 `( L+ d* g Z+ N - end
7 V" r% Q" Q- x: G2 o* v/ j - #-------------------------------------------------------------------------------4 }2 B$ L/ |/ x5 z4 S
- def dispose5 l m& `& {! G, h1 ^
- super) f9 G7 P1 w# z R( V) H
- @bars.dispose if [email protected]?
! w; G) N" F7 w; p: D1 q8 b - end% M0 v- J/ V- H0 }+ J
- end% S; [0 S0 @) ]6 ~9 \
5 X1 ?: Z f) w$ F: L" d! f6 m- $mog_rgss_s_hud = true
复制代码 - d9 \7 K! Q; j0 ]# ?9 d3 e* |% d
4 @3 M5 C {& W3 c
1 u2 e5 y2 X7 _. g2 F上面所說出錯的203行內容為
G$ ?1 g+ h0 a@hp_sprite.bitmap.clear
1 c" h+ {* E0 @0 x& `& D I$ w/ |+ P" A7 |" T4 p3 y
想知道怎麼解決
* s0 j- ^9 k7 d2 N9 c. C* _# o3 c+ w. a3 P, m9 N$ b
該腳本支持3.82
2 d6 I- u% T O. r7 A3 g! Z" n1 ~- x5 k9 x2 \: V2 [
下面是圖檔,要塞在Windowskin下
, B( q* Y9 L1 }3 i& A z& g
) b) ~2 q7 F1 o/ u1 D1 U
S_HUD_Graphic.rar
(12.36 KB, 下载次数: 49)
/ |) a; i# c$ Q' F }
. H- u F8 J2 D* o( E
$ N2 E0 W$ }- \& u. n1 s( P! j+ U- E% Z5 X
|
|