赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 1 |
经验 | 31761 |
最后登录 | 2024-8-20 |
在线时间 | 1740 小时 |
- 梦石
- 0
- 星屑
- 122
- 在线时间
- 1740 小时
- 注册时间
- 2009-7-12
- 帖子
- 443
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
這是我將官網的S_HUD修該而成的怪物血條
3 o( w6 g$ [7 x/ r, v# m. O# {1 X5 y會在每隻事件怪物的腳下顯示( M. _( ?5 N9 [" M# l% S) I
問題是不知道為什麼. R& V* y/ q0 ^0 N0 |
有時打怪打一打會跳出
: b+ Y7 G; s5 i; L---------------------------7 |. {, Z n2 }* c7 X3 h
XAS
k" n& \. ^: M* u* F# H& u---------------------------
$ ^4 S! b9 L/ P2 R- z脚本 'MOG - S HUD' 的 203 行 发生了 RGSSError。
O$ r z& g- m* \% p, [5 b" P1 A5 t; Y v
disposed bitmap
L6 |: l/ ]' z' M" l ]0 Y---------------------------
% t" F% R6 e8 [/ N% f P! a5 \確定
' f$ F, C3 }0 I5 B) I---------------------------* B0 `6 t2 t3 w* _
0 W' d# [; p+ H4 C* o# G: N" S6 A* O這是腳本
# G0 C8 K+ v3 _1 k. e6 ?
; P. i: l# U+ g, M- U+ m- #===============================================================================0 ^! I' B( {6 [5 I1 Y
- # MOG - s Hud 1.0
5 Q! U$ p9 _" K8 u! w$ N2 ? - #===============================================================================
1 Q0 Z7 R3 W% X% M l+ a - # By Moghunter % f: {/ |. a8 ]7 Z; G3 r+ Y
- # http://www.atelier-rgss.com
/ b; X: _6 I* Y C4 b( J! [$ ` - #===============================================================================. s& g& N& A1 H1 {0 b
- # Translated by Calvin624 % Z$ e5 S5 M4 p' a
- # http://www.xasabs.wordpress.com
2 X3 q; B) p& Y9 p4 c0 y' T; W - #===============================================================================5 W" Q# k# T& x, k
- ###############################-DESCRIPTION-#################################### o) S* N: E2 w) O8 }& v- k
- #===============================================================================* S- g! m9 I* F' o# f
- # Personal HUD – displays the HP and SP below the hero., x& f2 f! q. c8 T' F, ~) J8 P: S
- #===============================================================================
& x) Y2 V$ c0 l. M' s - #+ I8 s" r( ^4 D K
- # Graphics required:8 x, B2 J/ e" \, c
- # 7 |* ^3 w/ S! \ h4 N0 Q; [1 y% x! x
- # S_Border_HP_Meter.png* R+ O8 h" W2 n1 {6 L1 s
- # S_Border_SP_Meter.png
- A. _$ Q4 \! I6 d* \! U3 k/ t - # S_HP_Meter.png) t, n' C2 ^% X. W! w% }
- # S_SP_Meter.png
. P- ?9 o n) | - #
" w+ J) U! T7 Y - # All images must be in the Windowskin folder.
8 U% s3 v, t0 S - #1 y6 Z* v6 f. Y( J3 `5 M5 E
- #===============================================================================
' D4 \3 p% ~1 n/ m" [% n - module MOG# \4 F& W$ g+ s. F- i* i
- VISIBLE_DEF = false
% ` g/ T! A* ]3 U$ c! G1 }' l" m - # Show HP meter?2 q) X# i t, }' q; p
- HP_HUD = true" {6 t8 b' u ]
- # Position of the HP border( v- U( ]' ~8 e/ ?5 [
- S_BORDER_HP_METER_X = -22 Y" K R q8 Z' q u7 O
- S_BORDER_HP_METER_Y = -2 3 J( Z1 z2 \) C7 w' Y
- # Position of the HP meter
+ C* ^. W; Q) K - S_HP_METER_X = 0
9 Q8 O6 F X8 K - S_HP_METER_Y = 0( b$ T, g3 A7 `! j8 Y
- # Show SP meter?
! u) x" E' R; X5 w* [# l7 r - SP_HUD = true K K; F( Y: `
- # Position of the SP border
8 `% B- I, u2 v9 H* A" `6 Q, F/ i7 v5 z* X - S_BORDER_SP_METER_X = 0
& G {* [& }! ?0 u% @ - S_BORDER_SP_METER_Y = 10
5 ?0 D; f2 j. F! z# z - # Position of the SP meter$ y p- x. s2 s! f
- S_SP_METER_X = 0, a" Y0 [1 G0 h, ?
- S_SP_METER_Y = 10
6 A% p3 J: @: M& P: g, J; V" h+ | - # Switch to disable the HUD$ v' d# z3 ~8 z& Q! F, n
- DISABLE_SHUD_SWITCH = 5
4 P( Y1 M2 d/ k5 y7 v1 B& F$ T - RANGE = 20/ F/ f! G6 \; |1 w8 x% o# y
- end& Y0 y" E; e8 k9 A% L" i
- #===============================================================================
- ] L/ Y+ @$ I3 j - # S Hud
/ q5 b( k2 F7 s; S- `, G - #===============================================================================) ?5 t. ]4 Q% j0 K, b
- class S_Hud < RPG::Sprite
0 |+ ~$ o1 B# I/ g: w - include MOG' y( H0 Z4 ?& c1 H, z
- #--------------------------------------------------------------------------: F, Q0 J2 q1 Q& T8 R
- # * Initialize
7 J! c7 Q4 ]6 y$ a `9 D - #--------------------------------------------------------------------------$ K1 n$ D) b V! L% _
- def initialize(enemy,viewport)0 ^$ [* v$ d. w( n) a( X4 g! @; ]& o
- super(viewport)
: @( }' `- k) t% M - @enemy = enemy1 ^ F' A8 A5 b5 ~' W6 |
- @battler = @enemy.battler0 Y+ ?/ d1 d" j. i( L
- @old_hp = 0
, P7 u2 p% x8 V6 V* A$ u; x3 C8 b - @old_sp = 0
: P! x |+ W- F% }. m5 P: }- Y - @old_vis = false
. a: g4 h) s8 Q9 R' d - self.bitmap = Bitmap.new(100, 100)
3 u8 f7 s+ P0 S% c* q F$ P. I - self.visible = (VISIBLE_DEF)#false% i0 j3 ^# [# o
- self.z = 1007 _/ `4 b; M- E( p
- #HP Border -------------------------------------------------------------------
+ g) S) m! R* B4 b - @layout_image = RPG::Cache.windowskin("S_Border_HP_Meter")
5 g- o' A: x# |9 ?, F - @layout_bitmap = Bitmap.new(@layout_image.width,@layout_image.height)
% p$ ~ l j# w3 _2 s) b - @layout_sprite = Sprite.new
! N! A- s; W4 h/ ~ - @layout_sprite.bitmap = @layout_bitmap$ a, ]9 v) U' V' Q9 p: w( W
- @layout_src_rect_back = Rect.new(0, 0,@layout_image.width, @layout_image.height)
/ ^& j6 Y" I2 h# O7 c" F - @layout_bitmap.blt(0,0, @layout_image, @layout_src_rect_back) 2 N9 q% }6 ~( O/ N! w
- @layout_sprite.z = 5001* b3 B/ e7 \9 O y) d" X$ g
- #HP Meter ---------------------------------------------------! O9 u# q+ {5 e; [
- @hp_flow = 0: T, A6 S/ A# m2 V+ `/ C( p! ^
- @hp_damage_flow = 0. _0 d( Y, G/ h. Y3 M, p
- @hp_image = RPG::Cache.windowskin("S_HP_Meter")) T4 D9 t) L8 g/ N6 t3 z
- @hp_bitmap = Bitmap.new(@hp_image.width,@hp_image.height)
9 F, ?' ~! m$ C - @hp_range = @hp_image.width / 3
5 j& R( ^% F4 U7 V% m% t/ l7 r - @hp_width = @hp_range * @battler.hp / @battler.maxhp
2 S" L( i+ J, {& T1 w, U( m' A( L5 ? - @hp_width2 = @hp_range / 27 p! ^% S. p$ k5 e* ?$ h( f
- @hp_height = @hp_image.height / 2- V( @0 _ L+ ~7 y+ {7 r
- @hp_width_old = @hp_width
! X* x; K3 V; j- s* v( p - @hp_src_rect = Rect.new(@hp_range, 0, @hp_width, @hp_height)) s& T: \( a6 s, z
- @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
4 h% Z1 o5 l2 L% W$ j9 W! R - @hp_sprite = Sprite.new3 ]+ |4 s& @4 @
- @hp_sprite.bitmap = @hp_bitmap
6 b) [( w3 f) d8 M: | - @hp_sprite.z = 50024 @: l+ z! b7 s+ u# Z5 p& A
- #SP Border -------------------------------------------------------------------) V6 m" f3 b0 T* y* y$ ]
- @layout2_image = RPG::Cache.windowskin("S_Border_SP_Meter")- d: E' J( ?; L ~2 N1 j
- @layout2_bitmap = Bitmap.new(@layout2_image.width,@layout2_image.height). h/ D1 K! S! k3 j/ L7 j s4 n
- @layout2_sprite = Sprite.new/ K9 A& E, O4 Y8 |. M8 m+ S
- @layout2_sprite.bitmap = @layout2_bitmap3 [$ L5 H q) B0 z: t
- @layout2_src_rect_back = Rect.new(0, 0,@layout2_image.width, @layout2_image.height)
" q1 K" S; B i1 P& O, A - @layout2_bitmap.blt(0,0, @layout2_image, @layout2_src_rect_back)
/ e" P+ |9 K g$ U M4 @ - @layout2_sprite.z = 5001
2 w) _7 S6 A: K, ] [* S: e% s - #SP Meter ------------------------------------------------------
0 l2 |* g3 O: k K* O( X - @sp_flow = 0* X& E# `. Y; U! `. X8 M6 l6 C
- @sp_damage_flow = 0
5 L: }( l! O! [8 ^4 @ - @sp_image = RPG::Cache.windowskin("S_SP_Meter")
# i) R# r9 ]: m% [2 ~7 K1 x - @sp_bitmap = Bitmap.new(@sp_image.width,@sp_image.height)5 L: G/ a2 K& @ b* S0 G" b
- @sp_range = @sp_image.width / 3
2 F" q9 w8 d9 _6 X2 r - @sp_width = @sp_range * @battler.sp / @battler.maxsp : v, x- T. m8 o1 B; t9 ]! r
- @sp_width2 = @sp_range / 2
" v0 c$ u' f! c s - @sp_height = @sp_image.height / 2
+ J6 v4 p0 @; I1 q8 V' s/ k - @sp_width_old = @sp_width% D! V/ Z9 ?' S+ S
- @sp_src_rect = Rect.new(@sp_range, 0, @sp_width, @sp_height)# z) x, k2 I( g% v P; {+ }7 G
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)
9 W- R5 [) V& P0 O - @sp_sprite = Sprite.new0 T3 ?5 e( D5 R0 `$ H
- @sp_sprite.bitmap = @sp_bitmap' ~4 e$ s( {/ g
- @sp_sprite.z = 5002
2 ^: O5 `4 L1 J3 W1 J; [ - update4 T! V, e/ T' `2 f1 E; d, i
- end n9 h! W. D# U( @
- #-------------------------------------------------------------------------- m4 K2 h' B- ?! G1 a6 i6 [7 y
- # * Refresh x B; p1 Q& v. U+ M) a( e
- #--------------------------------------------------------------------------; C' N4 i; S2 } ?; G
- def refresh8 T& z) L; Q2 r/ o% G* ~1 m
- return if @old_hp == @battler.hp and @old_vis != self.visible
c/ n0 V, G5 y$ D8 ` - self.bitmap.clear" m" ^1 Z4 W+ p, n/ {# B" [7 ?
- @old_vis = self.visible
# K2 k: q) O! n5 h - @old_sp = @battler.sp7 W; c2 K. {" \0 B3 V U
- @old_hp = @battler.hp
7 X% {. g$ v9 a' {& B5 V) Z - hp_flow_update4 S% x4 j3 b: U
- sp_flow_update- U' m% W- E" |( ^, r Q
- hud_pos_update5 P& r( k: ]6 M9 z0 F9 u
- visible_update, @1 i4 }) f* Q
- end
9 G' x& e' a* p& _. g- h8 S - #--------------------------------------------------------------------------+ D& m3 c9 g6 L9 O
- # * Dispose
0 z0 E+ \+ X7 X1 q" g$ \: D- [" D - #--------------------------------------------------------------------------7 X* u6 C. n& o
- def dispose2 d+ N2 \& l* i1 a3 A
- #HP Meter Dispose' [5 \; Y# v+ j0 o1 i
- @hp_sprite.bitmap.dispose) z C o+ b9 d$ L
- @hp_sprite.dispose
2 _. `* [- w; @% }% {) h - @hp_bitmap.dispose. O9 b7 w+ g* X$ X3 u
- #HP Border Dispose
) z( L! Q; B3 K- J# \/ j" X5 M9 T$ M - @layout_sprite.bitmap.dispose
+ ?$ }+ s1 Z" H1 U - @layout_sprite.dispose' P7 _3 ^# k. ^/ @5 O/ S0 |
- @layout_bitmap.dispose; c% y+ R+ Q) x1 F/ N9 I) Y
- #SP Meter Dispose# [1 `2 E4 N% ?# v" L
- @sp_sprite.bitmap.dispose+ F7 c/ @5 s* r7 x
- @sp_sprite.dispose& n4 _- D- ? j
- @sp_bitmap.dispose
$ `1 c8 U# B+ Q- L1 R - #SP Border Dispose8 |; i# R* k0 G5 Q1 p
- @layout2_sprite.bitmap.dispose/ {% H# E/ E% ]: R6 S5 q7 u8 a6 v
- @layout2_sprite.dispose
4 g* p# a# W& ?6 R; j - @layout2_bitmap.dispose: o# \) a$ s. T( Y& b- R6 t
- end
$ l, s5 E4 C0 y" B - #--------------------------------------------------------------------------
' A* T; u- y$ K8 h. c4 u - # * Update J/ B6 h( U5 r& n9 b6 d9 ~5 ~+ {: g
- #--------------------------------------------------------------------------8 y" G* D" D4 H9 A3 I
- def update
- ` ]( w" _7 O' O: o5 {% Y - @battler = @enemy.battler
$ u/ S1 X; d' x1 n, ]1 M" Q - return dispose if @enemy.dead? or $game_map.events.values[@enemy.id].nil?' O9 i. S, g! j0 `, l7 r, x b
- if self.visible
. s4 w' X- U. G8 U4 l! N - refresh
1 m8 |) x% f2 I6 P - else
' e0 i) D- C, A) U5 O3 @' J - self.bitmap.clear
; J: }) \$ D* }/ y - end: e3 s6 L" `. V k, h# J+ z, _7 V
- end
$ l3 p8 l! d7 q4 d& [ - #--------------------------------------------------------------------------
" K1 N- b7 s7 O, j - # * Visible Update
3 i1 p1 }( H+ N+ }& @ - #--------------------------------------------------------------------------# \3 H' S7 o4 t
- def visible_update+ @) F+ p( b( i- t3 K6 ~
- if $game_switches[MOG::DISABLE_SHUD_SWITCH] == true
k, U1 F4 y( z7 x! v& Z# W$ E - @hp_sprite.visible = false8 @ G( g' _. u. H' j. n* l
- @layout_sprite.visible = false# i0 z7 H3 `* a: p: v' I: k
- @sp_sprite.visible = false/ [; f; @6 n }$ F
- @layout2_sprite.visible = false% z4 Y! [/ c. i8 A, h
- else v7 u8 N" H4 S0 s; `- _/ T% ^
- if HP_HUD == true
% w2 N5 C7 F! ?( q; {# H2 a, v5 o) E - @hp_sprite.visible = true
, e! j% ~. R9 W3 S - @layout_sprite.visible = true5 q8 u1 ?% Y9 C; Y# a2 X
- else" [0 }8 i2 c7 K: ]" n/ h9 @8 y! v
- @hp_sprite.visible = false6 o! C" q6 K) m/ \. m: d: i% F
- @layout_sprite.visible = false
7 {! o7 q5 V+ `+ B g+ K - end 0 E, S6 d# g: @
- if SP_HUD == true# m9 A+ ?6 R5 W; S% P
- @sp_sprite.visible = true! ~% m& }. n' p( I' Q) H* x2 [
- @layout2_sprite.visible = true
# L7 J7 u/ j! Z, l, Q% e% O: @8 Q - else
, K7 z- R1 [. A& ~- h& A - @sp_sprite.visible = false
% `$ S) `$ R3 F - @layout2_sprite.visible = false2 p' H$ t$ `3 o
- end
) H9 }4 s9 `: S6 i; }- ?, C - end * x8 a# C1 Z# K! l( Y
- end 5 M# ~& v8 j/ r* r2 m: {$ x
- #--------------------------------------------------------------------------8 \5 o2 l( E- y, u! O; T! Q
- # * Hud Pos Update
, R* f" v) b) Q2 [" r - #--------------------------------------------------------------------------
2 I: [' c. |9 I: j+ {( o7 ~ - def hud_pos_update
$ U' r6 U' W1 d: x* l& b- F; r - @hp_sprite.x = self.x - @hp_width2 + S_HP_METER_X
. _2 T C) Y8 i- }4 f: C - @hp_sprite.y = self.y + S_HP_METER_Y
* Z& b# C; U4 x( S+ [) ^ - @layout_sprite.x = self.x - @hp_width2 + S_BORDER_HP_METER_X
+ N3 L3 y7 a/ q7 s4 O* M+ | - @layout_sprite.y = self.y + S_BORDER_HP_METER_Y
* c- {6 o: r1 Z; ~ - @sp_sprite.x = self.x - @sp_width2 + S_SP_METER_X
/ s4 h# g1 `% t" k - @sp_sprite.y = self.y + S_SP_METER_Y 1 L4 R6 T( s5 v# o
- @layout2_sprite.x = self.x - @sp_width2 + S_BORDER_SP_METER_X
/ _0 _# N2 P6 H" @, E - @layout2_sprite.y = self.y + S_BORDER_SP_METER_Y I! J; I$ w, G# U0 j% @
- end
- Z' y) j; ~+ k$ _8 S - #--------------------------------------------------------------------------3 ]( Z+ m+ S& N1 {
- # * Hp Flow Update
: @, T6 N) K9 l. @# _9 B! s1 k; F, ?* u - #--------------------------------------------------------------------------
3 j' N7 q0 ` I. _2 J - def hp_flow_update0 _9 `5 a* F* Q G+ g" Y
- @hp_sprite.bitmap.clear
& g2 p4 I( T5 H! ~* V- s - @hp_width = @hp_range * @battler.hp / @battler.maxhp
8 G: N( J& _2 @- e! V - #HP Damage---------------------------------0 z! a: W1 w h* N$ T8 K9 A5 Y
- valor = (@hp_width_old - @hp_width) * 3 / 100! }* [& T$ _, i/ ?0 E% ?/ O
- valor = 0.5 if valor < 1 4 R: {8 v1 L, q. A0 M
- if @hp_width_old != @hp_width
% a- R4 w" M+ i& a& k: b - @hp_width_old -= valor if @hp_width_old > @hp_width
5 B9 M( K9 d$ s: Q, D/ w5 G8 ` - if @hp_width_old < @hp_width 6 N8 h) ~4 E0 T6 U' K
- @hp_width_old = @hp_width
1 l) E4 [$ Q* Z+ B8 ]) _ - end
: z( D' j( l7 N! g+ v - @hp_src_rect_old = Rect.new(@hp_flow, @hp_height,@hp_width_old, @hp_height)
% o# ~1 Y" A7 }0 C% | - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect_old)
6 Q7 m$ K ?4 E, b( K, g - end + T. J5 W) l* }5 w2 m, D8 J1 M
- #HP Real------------------------------------! ~5 B! R* |8 p- c
- @hp_src_rect = Rect.new(@hp_flow, 0,@hp_width, @hp_height)
9 f0 Y5 k7 d' h - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
5 h" s# e: t1 A- y" D$ A - @hp_flow += 2
4 D" A( g5 T: c7 X/ C- a2 ? - if @hp_flow >= @hp_image.width - @hp_range
; L v4 G2 r7 O2 S - @hp_flow = 0
. O" e! y. _1 r7 i4 w - end# e. `6 K$ x. t! f2 G% b$ i
- end ! ^7 x: D9 b3 |7 T' P
- #--------------------------------------------------------------------------
- N7 N$ h3 f; g# X - # * Sp Flow Update
. B2 ]8 }) T; g3 r1 l - #--------------------------------------------------------------------------
. \8 b8 [. [( l& B - def sp_flow_update
! p3 X3 j) ^+ ?; u - @sp_sprite.bitmap.clear/ y6 X0 e( _' N1 O. B6 q! J# v6 J* G
- @sp_width = @sp_range * @battler.sp / @battler.maxsp
# {' d C3 U- I! D+ l7 c5 @ - #SP Damage---------------------------------
2 ~7 {& J2 f8 K2 y& i n% T - if @sp_width_old != @sp_width4 r/ w3 L6 j7 L1 a+ S% R
- valor = (@sp_width_old - @sp_width) * 3 / 100
; z2 i) N6 F6 v8 b - valor = 0.5 if valor < 1
9 Q' [/ \$ [0 j3 K9 A - @sp_width_old -= valor if @sp_width_old > @sp_width
0 R# N7 d1 s+ m - if @sp_width_old < @sp_width
: \2 ~6 c- T3 p0 | - @sp_width_old = @sp_width6 [5 |6 z# r( H) _. z
- end 2 W# o) z4 X' d/ c0 a
- @sp_src_rect_old = Rect.new(@sp_flow, @sp_height,@sp_width_old, @sp_height)
/ f7 k' b8 Q- |; q - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect_old) & V9 E0 J& H+ F
- end7 k2 g/ h% P1 u0 m1 N
- #SP Real------------------------------------
; m* f" A2 e0 V O6 Z - @sp_src_rect = Rect.new(@sp_flow, 0,@sp_width, @sp_height)8 M! |! m( m5 j" n6 k
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)1 i6 G9 b& g& i, @6 m
- @sp_flow += 1
# V, v# o4 I; J& O' ?) f& W2 |# U - if @sp_flow >= @sp_image.width - @sp_range
0 W& @; v; { t& Q* t - @sp_flow = 0 : P* `! [! f0 h# A6 f, V
- end& k5 g: \8 _7 y5 p8 D6 h, s. z
- end
1 h- ]! C' J, N9 T, {# x - end
5 }, j" T; k8 B3 ~" [ - #===============================================================================( S) a; e/ _* T% R% i. z! T H) n
- class Sprite_Character < RPG::Sprite
8 |4 E0 M- e) ^" e# [7 \8 j - #-------------------------------------------------------------------------------
6 X5 V3 Z8 Y% e0 _ - alias :xas_emini_hud_init :initialize: |, e9 B4 J/ y- F
- include MOG
. g+ g$ ?1 x9 B3 j* e% [ - def initialize(viewport, character)
- s; }* f* |9 p: e' J5 t" ^ - xas_emini_hud_init(viewport, character)
: z, J M+ ^0 u1 e0 x0 |$ e* ]& t - @viewport = viewport- h+ u; ]. D- ~5 B8 C# O
- return if @character.battler.nil?2 H) ?; i3 s; k8 W
- return if XAS_BA_ENEMY::ENEMY_OBJECT.include?(@character.battler.id)1 G' M7 j' M; y7 p- t6 d
- return if XAS_BA_ENEMY::ITEM_ENEMY.include?(@character.battler.id)
3 c: q. @( a7 Q - return if @character.battler.is_a?(Game_Actor); @! q$ [9 W; K# j j
- @bars = S_Hud.new(@character, @viewport)
5 u* b9 s" |! b) M+ J a - end
+ c+ Q( `" Z1 ] ]0 `0 L( e - #-------------------------------------------------------------------------------/ K9 f8 c9 H& v) c, i
- alias :xas_emini_hud_up :update
0 C! c& r0 `/ K7 N# I - def update
; I( P! f6 C& m5 b3 { - xas_emini_hud_up
7 t- D- a T* g% B8 V7 h - return if @bars.nil?
! x( l3 e) O& i! Y7 X/ D$ @ - return if @bars.disposed?
8 Z8 p# `" Z* }0 e( B; o - dis = ($game_player.x - @character.x).abs + ($game_player.y - @character.y).abs# C6 w3 Q/ ^2 [3 A# T5 n
- @bars.visible = (dis <= RANGE)
5 \6 d1 }6 H" p- c1 g# [4 l% P$ r - if @bars.visible
: Q1 e% @7 K( W8 C7 f+ t' [ - @bars.x = @character.screen_x# - @cw / 4
' Y, g* p4 R) y9 _5 e - @bars.y = @character.screen_y# - @ch / 4% m( ]; n& J8 c2 B7 o
- end w9 v. O; D/ w9 }, f
- @bars.update
7 h! A: O0 j9 `( X& i% h; c - end
% }7 {/ l- W t, R& r6 @ - #-------------------------------------------------------------------------------4 ?6 \/ R1 C! K
- def dispose
; ]- h% l3 v7 b3 |! Q* h/ s - super" e! J& C* ^# ]$ w" `
- @bars.dispose if [email protected]?
8 s9 ]4 [9 ]# B# K - end
?1 x; @6 _5 k: `% q' u - end1 k. q$ a. ]0 n6 X( P
- # S7 Q" W" ~ }
- $mog_rgss_s_hud = true
复制代码
$ R- c0 l% l Y& W9 \3 `0 _, l' A" [
4 z% b0 Y; B- q6 V
上面所說出錯的203行內容為3 b" t# i/ W' j: f- J
@hp_sprite.bitmap.clear
& ]3 ^5 H. t; Z/ L9 e+ \
2 Y+ P% x* Q7 E+ |. k+ g# o9 h: h想知道怎麼解決
4 i$ J$ H t5 t' t# B8 p: s: j0 F6 V( O& }8 p6 P
該腳本支持3.820 M* H5 J+ f: ]: `" Y* u Q/ F
" s5 U; z( H9 a) c! G" h! @
下面是圖檔,要塞在Windowskin下
$ Y+ a: v9 h6 P; u6 _, n3 p7 V- ` W1 }
S_HUD_Graphic.rar
(12.36 KB, 下载次数: 49)
$ b6 Y% e+ p# U# w' {3 w4 F% M
3 F+ U g0 \; U# c
5 U; o) r+ u- o, V1 C# l6 A, `% N9 H3 i+ S: R' H- B, W
|
|