赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 1 |
经验 | 31761 |
最后登录 | 2022-11-20 |
在线时间 | 1730 小时 |
- 梦石
- 0
- 星屑
- 80
- 在线时间
- 1730 小时
- 注册时间
- 2009-7-12
- 帖子
- 443
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
這是我將官網的S_HUD修該而成的怪物血條
2 H, e9 i) `0 M" n8 ]+ o" p會在每隻事件怪物的腳下顯示# @4 S2 f! P+ A
問題是不知道為什麼5 N. x+ c5 G6 g3 C9 I! s( h- M2 l& R
有時打怪打一打會跳出. X7 O2 H9 B/ p7 L% c6 h% q
---------------------------
% C( u) h. u0 B9 r+ ~- V- mXAS! u$ G2 w2 U) A' t: A3 w- R
---------------------------" S1 v& D7 i2 ]5 @; h- V+ ?% e
脚本 'MOG - S HUD' 的 203 行 发生了 RGSSError。
" f; l% P! Q: C5 u! P% j
1 I) Z& y3 G) D2 y5 wdisposed bitmap5 E' ]$ h1 H. y7 A
---------------------------: L. r/ c1 P. ^9 P6 C
確定
' K6 x& l- ^6 z7 d, ^# h& h---------------------------8 f7 g+ T+ B! J% I5 x4 `0 n
4 U6 _6 q: b$ u* y這是腳本
6 [1 @: Z/ @. p: L. N3 V! v
8 N- `- t# S% H) o- #===============================================================================1 R1 a n( q/ P1 T% k3 \- M1 T& z* }
- # MOG - s Hud 1.0
3 \3 {) {9 w7 i - #===============================================================================
' Q3 b) G4 i- T _8 L - # By Moghunter
, R1 h. T5 z( X - # http://www.atelier-rgss.com
: D& J- Q4 A4 q, Q4 @ - #===============================================================================) v4 s% I+ u/ d d, C0 M! L
- # Translated by Calvin624
1 a6 f, p) Y4 \1 h" r - # http://www.xasabs.wordpress.com. e; g% K% j4 P0 z
- #===============================================================================
2 O2 I9 a- j4 J - ###############################-DESCRIPTION-####################################
5 C+ R" s( r \( } - #===============================================================================
; Z) V9 N* o# N - # Personal HUD – displays the HP and SP below the hero.
" d' \! k2 j5 B2 ~ - #===============================================================================
+ G. ?$ L4 _% |$ R2 w: z( U% z - #
: l2 I, ?4 D8 ~3 C+ @ - # Graphics required:
" z; C& k* S& ?( u9 l - #
- n% a4 _0 _2 h! _) T5 R. I3 J - # S_Border_HP_Meter.png
3 X* ^5 C C( f0 y: z - # S_Border_SP_Meter.png
4 c5 x/ Q5 p/ F3 { - # S_HP_Meter.png) R& V) t/ X* j2 M- D
- # S_SP_Meter.png
" K& H: g1 M" ^8 f8 d - #6 u( i4 X; q9 |6 P; K8 ^7 k3 l
- # All images must be in the Windowskin folder.7 M R9 ]: A& Z$ ^) ]
- #
P9 a. b; o3 h# S0 R - #===============================================================================7 O8 e# u3 G H g7 o5 @
- module MOG
6 J4 f9 p0 o" v% V4 Q. z" F - VISIBLE_DEF = false 9 t7 I, X1 j- W( i4 R' q/ ]( ]
- # Show HP meter?" \# w9 b% z! o0 a
- HP_HUD = true8 r2 m, R9 ]& G4 y! O/ B) I) D
- # Position of the HP border0 j/ G0 ^. l& O. D
- S_BORDER_HP_METER_X = -2
2 }' e! w* n. ]( X. p - S_BORDER_HP_METER_Y = -2
4 A* F: f. h# f, v$ l4 ] - # Position of the HP meter% ?. F% t$ F1 D0 [$ W% R+ i
- S_HP_METER_X = 0
, L1 | ` h% [4 ^* m( e - S_HP_METER_Y = 0
Q. J }* C1 ^4 x' G* j2 Z - # Show SP meter?( _+ o9 h% l. t2 |& m0 `9 P
- SP_HUD = true' }9 Z4 P. t7 q, @" y
- # Position of the SP border
$ C5 b" r3 ^/ t. _( y% D5 }7 Y - S_BORDER_SP_METER_X = 0, \) L _! A7 C. `( x2 n9 t
- S_BORDER_SP_METER_Y = 10 4 |' y; Z' C/ _& y8 Y, E) M" _ [% L
- # Position of the SP meter8 x* A8 M7 K# m0 O7 L3 d: h/ q
- S_SP_METER_X = 0
$ X3 X& L2 K" U4 a3 W, @; _; l( F8 c - S_SP_METER_Y = 10
' T& P& T% t9 P a/ x- ]6 V - # Switch to disable the HUD" |. ^$ p5 H' w+ l. N4 t# `
- DISABLE_SHUD_SWITCH = 5! V9 F4 w0 ] A
- RANGE = 20
) |4 B0 k% R* e: @ - end
I; o9 e; i2 W. M) u - #===============================================================================" h9 x# \0 X' u8 c7 z* [, k
- # S Hud4 s& C6 X8 }# V1 V" _3 y" [' a
- #===============================================================================
7 Q& ?+ Y7 @6 D, D - class S_Hud < RPG::Sprite, }( @" Y6 l* x1 ~( {. V; q: Z5 _
- include MOG
1 H- R. ~% m7 N# y$ ]+ J - #--------------------------------------------------------------------------8 q9 ]0 `. o; w* }
- # * Initialize; y8 o p @0 Q' [! G N
- #-------------------------------------------------------------------------- T4 }4 V" {! ^
- def initialize(enemy,viewport)
% l; Y7 L2 F& t% w - super(viewport)
& k0 K& w; g/ X1 F" | - @enemy = enemy
' r, |! Y/ ^6 H! J - @battler = @enemy.battler, T+ F/ f9 `, t. I
- @old_hp = 00 V- n* w8 L9 S$ h9 z4 J0 @( @
- @old_sp = 08 \# D# i) T8 g5 G+ c* d
- @old_vis = false5 B: P4 O% \5 c" c+ k) Y
- self.bitmap = Bitmap.new(100, 100)
; J& d& I/ F8 ~6 k8 L' q( _5 | - self.visible = (VISIBLE_DEF)#false: j a" c. Y% Z: v1 Q6 u$ g; M9 a
- self.z = 100/ }( @! z5 n! C& L
- #HP Border -------------------------------------------------------------------, B3 s1 a) R, C$ e E2 h v9 W
- @layout_image = RPG::Cache.windowskin("S_Border_HP_Meter")
3 ~% F/ U4 S8 ?. r) u& p - @layout_bitmap = Bitmap.new(@layout_image.width,@layout_image.height)
5 k( Y+ x" }2 `* P - @layout_sprite = Sprite.new6 c- w6 G* k" Z0 F
- @layout_sprite.bitmap = @layout_bitmap- h3 v0 a; t) B: C1 _
- @layout_src_rect_back = Rect.new(0, 0,@layout_image.width, @layout_image.height)
8 K, }5 O/ ]0 G - @layout_bitmap.blt(0,0, @layout_image, @layout_src_rect_back)
& u- d. n. @* F' M( m, K - @layout_sprite.z = 5001
3 C$ ]. \* D D1 U5 {* S - #HP Meter ---------------------------------------------------
9 g$ d) x7 _2 R/ v - @hp_flow = 0
1 Y" }! X! ?: B: J; [0 X1 @ - @hp_damage_flow = 01 A! P! L/ J/ Z+ K, y8 `
- @hp_image = RPG::Cache.windowskin("S_HP_Meter")
5 M x# W# `4 x0 N H7 }( \ - @hp_bitmap = Bitmap.new(@hp_image.width,@hp_image.height)4 x h7 M. L' i$ m2 z: ?. }; D
- @hp_range = @hp_image.width / 3( o! b$ j3 \, D& t' M7 w
- @hp_width = @hp_range * @battler.hp / @battler.maxhp M7 S- \4 `8 n, f% h B
- @hp_width2 = @hp_range / 2+ z- W+ ]( v/ K7 H6 }+ i
- @hp_height = @hp_image.height / 2
8 |% o: N3 b7 d2 K F% |+ \ - @hp_width_old = @hp_width' x8 v' r% O/ v9 g% J& a
- @hp_src_rect = Rect.new(@hp_range, 0, @hp_width, @hp_height)
! p+ ] h `" O/ C5 b6 f - @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
8 i4 x7 c. }% \9 V3 s1 h/ t - @hp_sprite = Sprite.new
( x8 n* x9 I5 Q: Y1 {$ \" c - @hp_sprite.bitmap = @hp_bitmap
) M4 c, J+ i$ [" w/ ~' S& G5 P - @hp_sprite.z = 5002, J8 s% m$ `2 J C# l
- #SP Border -------------------------------------------------------------------
, S- P9 H$ {" w/ n+ G - @layout2_image = RPG::Cache.windowskin("S_Border_SP_Meter")2 w8 |3 ] A$ j! t* Z2 `; v7 P7 q
- @layout2_bitmap = Bitmap.new(@layout2_image.width,@layout2_image.height)2 \# c5 P( x" F9 s
- @layout2_sprite = Sprite.new" w1 Q# q" L" H6 j
- @layout2_sprite.bitmap = @layout2_bitmap
0 P L0 Z, P1 c5 i2 c7 s1 B - @layout2_src_rect_back = Rect.new(0, 0,@layout2_image.width, @layout2_image.height)& {9 l4 V7 b1 E; V' a+ G, L
- @layout2_bitmap.blt(0,0, @layout2_image, @layout2_src_rect_back) & }8 V4 q9 M8 x0 ]9 n& q
- @layout2_sprite.z = 5001
2 M7 m/ y+ i ?8 ` - #SP Meter ------------------------------------------------------
4 w- ~0 c* h' r2 W! M+ b0 ~7 W4 ` - @sp_flow = 0
5 B6 ]! k7 s: |, _1 N- b - @sp_damage_flow = 0. q& t( f; \2 D8 {
- @sp_image = RPG::Cache.windowskin("S_SP_Meter")
' O# o+ n* K6 V, Q+ r0 k4 L - @sp_bitmap = Bitmap.new(@sp_image.width,@sp_image.height)% Q7 Y8 m( { L/ @3 Y1 d3 N
- @sp_range = @sp_image.width / 3- V d/ W* O9 }) |+ t3 x
- @sp_width = @sp_range * @battler.sp / @battler.maxsp - h% v0 f) P1 n9 L0 }5 ~& P
- @sp_width2 = @sp_range / 26 L4 `+ b/ Y) \
- @sp_height = @sp_image.height / 27 Y! Q/ e/ A' E1 h( p0 @0 o
- @sp_width_old = @sp_width& J8 e. X2 \+ x) F
- @sp_src_rect = Rect.new(@sp_range, 0, @sp_width, @sp_height)! g. J& D6 m) v4 a( S! Q
- @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)' q2 R8 m6 I; _* D4 e
- @sp_sprite = Sprite.new
5 {* _7 k5 E# [* [' q9 f - @sp_sprite.bitmap = @sp_bitmap
6 J+ G% T/ j- O: g" E3 { - @sp_sprite.z = 5002
- k2 n7 A- K% T& `# o- i3 M/ E: `+ I - update
& C! S) n9 V6 x: L% a" F - end
; I4 X9 X% O+ O" | - #--------------------------------------------------------------------------
; `0 [& _5 \. x, T' h0 v E - # * Refresh- ?" e9 i% G; l6 `2 u
- #--------------------------------------------------------------------------
( Y6 [1 s1 W$ W1 ? - def refresh s% j: H$ N5 g+ C$ z8 k
- return if @old_hp == @battler.hp and @old_vis != self.visible
( S* L& W5 I- v1 d+ k1 ] - self.bitmap.clear
( h, W3 u1 l; z- Y; } - @old_vis = self.visible
$ N9 B% f7 y9 V! D2 e6 o* q - @old_sp = @battler.sp4 u: W# Y" D8 ^# R! m
- @old_hp = @battler.hp- i$ g3 w) P- m) N' b
- hp_flow_update1 k8 l. U L3 S- s4 O( Q! N$ D9 I
- sp_flow_update
! Q0 ?6 x, N$ O7 { - hud_pos_update- D6 F: B2 o1 t
- visible_update
+ y. z$ b4 ?9 f2 n; e( J5 L - end
9 a/ S2 y" g9 h+ H% D. @. Q - #--------------------------------------------------------------------------
7 o3 j2 E0 z/ @$ O0 `: L% s - # * Dispose& w. c, ~4 R9 i) p: a: m9 O
- #--------------------------------------------------------------------------6 U$ w- k/ O0 Z
- def dispose3 T* E! @1 L0 w: U6 p
- #HP Meter Dispose
" F, ~! ^/ ]- m& T& S. K u8 O - @hp_sprite.bitmap.dispose
; w; j& Q9 B: Z- j+ ] - @hp_sprite.dispose9 J: P: A' E# B
- @hp_bitmap.dispose
; l; U+ B T( Y0 C' T0 R - #HP Border Dispose
( N! I7 k/ |% Y$ J - @layout_sprite.bitmap.dispose
8 V# x+ u) C# Y( R - @layout_sprite.dispose/ Q8 S4 x5 I7 ~0 a! _3 A2 n
- @layout_bitmap.dispose$ i. a% P0 ^$ w
- #SP Meter Dispose3 x% |$ p3 `6 q: f
- @sp_sprite.bitmap.dispose) ]5 E* \# I: l. h% l& Y' R
- @sp_sprite.dispose
1 ? N4 C: {3 d+ p) K - @sp_bitmap.dispose, U# g; L1 ]; a$ u8 p6 T
- #SP Border Dispose
9 Y. s8 M7 a! I9 \! |' \( ]0 o - @layout2_sprite.bitmap.dispose
, J/ |+ o" B8 V, s+ h" l1 A- [ - @layout2_sprite.dispose
5 X( x1 y! ?$ D6 o# C3 [ - @layout2_bitmap.dispose
/ Y4 s2 G3 Z i" | - end
1 R6 n E1 V; A5 y, g+ P5 h - #--------------------------------------------------------------------------8 ~/ |* _; ~8 J: n" a# E( W" L
- # * Update
: ]4 S4 Q7 d/ }6 u - #--------------------------------------------------------------------------0 Y2 x) E1 r1 f: l, S$ Q
- def update7 v; c. n( g" x
- @battler = @enemy.battler
: v T m: o0 D* ~; W' ? - return dispose if @enemy.dead? or $game_map.events.values[@enemy.id].nil?- ]# f5 a5 `# L+ e
- if self.visible
0 O# V' d. }; _! G/ M$ n" ?, W: D - refresh
" e$ M% q3 c& ^ - else
' W! _% @% q% l3 C1 H. {8 O# N - self.bitmap.clear$ E) h4 N' a" @' S, p' M5 w
- end# u$ \3 i6 j8 B5 \1 A# V
- end
{: P: w- U3 ] - #--------------------------------------------------------------------------
9 e+ E- K/ B3 }/ N5 ~7 M1 J - # * Visible Update6 C( v/ l, ]# w- @
- #--------------------------------------------------------------------------
1 ]. i4 r. |8 t% A - def visible_update+ y; ~& H% q8 X6 r
- if $game_switches[MOG::DISABLE_SHUD_SWITCH] == true. O& {, u A& E- B/ g$ I# }
- @hp_sprite.visible = false
( I9 R* s7 Y8 x7 o {. U' J9 c - @layout_sprite.visible = false
* l& n; R. L1 t+ n+ J3 e% i; C. Q - @sp_sprite.visible = false
7 @/ v8 Y1 q- j& u* q/ y - @layout2_sprite.visible = false
: D! q/ y7 N' x* u - else( m5 p- s# d5 @7 j0 J" z
- if HP_HUD == true
0 j4 }8 b: U2 C% ~4 [* }, H - @hp_sprite.visible = true
' q; n; Z% Z5 w/ `: i( @3 _ - @layout_sprite.visible = true
; j( E$ G6 B& B& o' M; R - else
8 A) s3 o, [# ]5 L - @hp_sprite.visible = false2 q3 |3 G; p4 W ~: L
- @layout_sprite.visible = false
7 p: [* J$ B; ?8 H. }* f$ s/ ~/ ? - end
1 ^1 K$ L9 H) z4 s* u9 w - if SP_HUD == true
/ R8 C( v6 k& R8 \ - @sp_sprite.visible = true. h" b% q# n ~) C$ m) E. p
- @layout2_sprite.visible = true" h9 |6 t5 Z! S2 s$ i$ S
- else
# L6 z0 i& A+ @( } - @sp_sprite.visible = false
2 m$ ?2 v5 x/ D- v1 m7 E# \ - @layout2_sprite.visible = false
1 R4 ?5 p, |! ^3 _9 w - end , O1 R7 e G- O, _
- end
" ?, Q V. h _! H - end # `" l8 X& S% B! P
- #--------------------------------------------------------------------------
3 I1 H! B1 g6 K - # * Hud Pos Update
. M+ a/ M9 X- ]6 H- Y: V1 s* ~: P - #--------------------------------------------------------------------------
8 Q" r7 F" P' h8 r6 }$ n - def hud_pos_update
c4 v5 { a! V0 a. f" H - @hp_sprite.x = self.x - @hp_width2 + S_HP_METER_X& D4 R% J( }" v1 e
- @hp_sprite.y = self.y + S_HP_METER_Y ( c, [" X! a, y8 o7 w
- @layout_sprite.x = self.x - @hp_width2 + S_BORDER_HP_METER_X
6 y9 Z; r% u3 h% r - @layout_sprite.y = self.y + S_BORDER_HP_METER_Y
8 h k9 }' t, A - @sp_sprite.x = self.x - @sp_width2 + S_SP_METER_X9 d1 w1 l* |5 t+ x6 X0 {
- @sp_sprite.y = self.y + S_SP_METER_Y
- {. k7 @2 ]: D5 G7 r - @layout2_sprite.x = self.x - @sp_width2 + S_BORDER_SP_METER_X8 U3 s! {5 \; z* O( l( Q
- @layout2_sprite.y = self.y + S_BORDER_SP_METER_Y / j' y5 j; T" o
- end . E8 [4 Z$ X B# T, T( o
- #--------------------------------------------------------------------------& L/ D" n' Z% R/ C @2 n( e! G
- # * Hp Flow Update
: T6 J7 C) w/ V# R( x7 z' }' Y8 ~ - #--------------------------------------------------------------------------
7 e9 x: V5 l" M% R! J' _' i& j - def hp_flow_update
+ `3 m) a. V( L/ Z - @hp_sprite.bitmap.clear
! N. h' a" J9 c0 J( x - @hp_width = @hp_range * @battler.hp / @battler.maxhp - G" i. u6 n$ t+ u
- #HP Damage---------------------------------
2 U' P9 C: I; Q, |& j - valor = (@hp_width_old - @hp_width) * 3 / 100
6 ?$ s5 v+ J. A \5 X - valor = 0.5 if valor < 1
% N4 u* s0 x' a* P) w) f - if @hp_width_old != @hp_width
5 C( l* |- F# f8 h5 C - @hp_width_old -= valor if @hp_width_old > @hp_width
% a5 a% n3 k7 ~: I" w0 K - if @hp_width_old < @hp_width % G" Z& n/ h! {# w# ~9 A$ D
- @hp_width_old = @hp_width
6 i# @/ Q! ^, N( U" m- C0 S& z1 M G- Z - end # g7 f9 \" `$ a5 U. c" @
- @hp_src_rect_old = Rect.new(@hp_flow, @hp_height,@hp_width_old, @hp_height)# m' m' l/ L: h2 u) P' e4 t& e& o( b
- @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect_old) ' b) p8 D. ]8 F: |* k9 j) Z
- end / n4 t2 k/ Y, A3 |- `" K- p' {
- #HP Real------------------------------------
4 B2 x" b6 x3 p6 v2 i - @hp_src_rect = Rect.new(@hp_flow, 0,@hp_width, @hp_height)$ A5 z, T8 w$ H/ N9 F6 C
- @hp_bitmap.blt(0,0, @hp_image, @hp_src_rect)
2 F$ i+ D+ y. v% d; u# v - @hp_flow += 2
: c1 u) x# ?# i9 ?$ g' A - if @hp_flow >= @hp_image.width - @hp_range8 u* N; k0 l5 S4 O, l; n) w' ? e
- @hp_flow = 0 & P+ `" e7 c( H
- end
/ r% D: m- E- w - end
2 _' u {& K/ s' f: _8 @: k - #--------------------------------------------------------------------------* U4 C! n5 Y" q6 V: B. _( w* ?
- # * Sp Flow Update$ l m# z( p; ^# a' N
- #--------------------------------------------------------------------------0 e. B& k$ d# z; B% d' Y6 L! ]
- def sp_flow_update& n" g. M! F/ k2 v5 D
- @sp_sprite.bitmap.clear
4 n0 m/ |0 R; n - @sp_width = @sp_range * @battler.sp / @battler.maxsp 1 l; V# f6 m5 h/ w+ |' J
- #SP Damage---------------------------------
. a8 i3 |; E& R0 M& ~8 ~# q' h' Z# b - if @sp_width_old != @sp_width3 S4 y/ S# e3 ?9 M# `. {
- valor = (@sp_width_old - @sp_width) * 3 / 100
3 ?7 ?7 g+ }2 Y/ G: V - valor = 0.5 if valor < 1
$ L3 H: B! u; H0 ~8 t3 O6 u2 n - @sp_width_old -= valor if @sp_width_old > @sp_width
( P3 `9 P* K$ Y3 \% J9 G( M - if @sp_width_old < @sp_width ) ]2 ]% _. `6 G% A) v; }/ j
- @sp_width_old = @sp_width
0 I' z4 m: a* s/ ^" E - end * c2 @: z" V. }* Z& A+ w
- @sp_src_rect_old = Rect.new(@sp_flow, @sp_height,@sp_width_old, @sp_height)
- i3 z# M3 M3 c9 l - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect_old) 5 U w, X! ~7 W) o2 n) q8 }
- end
2 a3 ~9 c% W. W, M/ ]) E% s - #SP Real------------------------------------
! T& _+ E- V* @5 t" \5 ~1 l8 Z - @sp_src_rect = Rect.new(@sp_flow, 0,@sp_width, @sp_height)
z8 e5 l9 U" C1 ?5 ~ - @sp_bitmap.blt(0,0, @sp_image, @sp_src_rect)7 B# M$ V) L/ I) N1 \( a
- @sp_flow += 1 ) A7 r9 u& T- o/ ?- Q
- if @sp_flow >= @sp_image.width - @sp_range l6 q/ S9 w* V( d
- @sp_flow = 0
. p2 ]' a; h, C5 r1 Y2 P% K - end
2 Q% u6 i; e2 q6 X2 f/ V; G - end 3 y" _+ i7 l4 k- @/ I, h
- end. e* G2 \' L( \0 k
- #===============================================================================( N. ]& E) ]# c2 [0 k
- class Sprite_Character < RPG::Sprite
, x H* d" l) {" k: B - #-------------------------------------------------------------------------------% Y& i: t2 p3 m' D \* n- Y
- alias :xas_emini_hud_init :initialize% A: q) G0 U: Z/ L" B5 T' \
- include MOG
/ ~" t: ]3 W/ ]& A - def initialize(viewport, character)
; [$ s$ Q* Z( M - xas_emini_hud_init(viewport, character)) i/ v1 f/ \3 @/ r
- @viewport = viewport
& s3 ?# V8 z+ ? - return if @character.battler.nil?- s$ G3 z9 E g$ q& y
- return if XAS_BA_ENEMY::ENEMY_OBJECT.include?(@character.battler.id)
3 t3 a1 L' R* j - return if XAS_BA_ENEMY::ITEM_ENEMY.include?(@character.battler.id)% d! L$ q# m5 f8 f
- return if @character.battler.is_a?(Game_Actor); ?9 | V* J2 K T8 `
- @bars = S_Hud.new(@character, @viewport)
9 g- q2 Y; X! g& q: n( c4 a - end* q. H9 m) Q8 o1 X, v# y9 U1 B2 @$ e
- #-------------------------------------------------------------------------------! @- z. d7 f8 c5 {- y$ p
- alias :xas_emini_hud_up :update" ^5 \4 z7 E/ q0 a) T
- def update
7 V/ u' S$ O6 k5 z - xas_emini_hud_up+ |5 `( Q" n' `& a) A0 w5 Z
- return if @bars.nil?
0 W# x9 f. G2 D4 D: m( } - return if @bars.disposed?
. D' y3 X- x0 n+ U1 m/ R9 @ - dis = ($game_player.x - @character.x).abs + ($game_player.y - @character.y).abs
0 w9 [. n- u( M& c" p/ A6 t2 x/ J! | - @bars.visible = (dis <= RANGE)
$ N d8 r, U4 }5 R, u- c" ^7 y" T - if @bars.visible+ F6 q3 l6 O S5 j- B% k! B
- @bars.x = @character.screen_x# - @cw / 46 ]3 b* s! C0 H9 c% \( [
- @bars.y = @character.screen_y# - @ch / 4$ U, g- W, {9 w D3 Z- G% V" p/ f" g
- end
* v3 `! E8 \. m9 Z - @bars.update* g# a3 q# Y$ S0 V
- end `' W. i$ ^9 u
- #-------------------------------------------------------------------------------
/ C9 d6 ]7 o+ j2 B( o* {. p4 T - def dispose
3 i- k8 G: d, L# W - super. r9 x, T. A) r8 z0 b+ ~/ p
- @bars.dispose if [email protected]?0 P" p% `* o1 _' {7 x* D1 W
- end
" E& }# A- O- i' ]& n1 l* ] - end
$ Y, r% @, s! ^& S s - # F9 }8 ]+ X- `( w% h
- $mog_rgss_s_hud = true
复制代码 ) v T# u6 C: r/ D* ~% f
$ P+ m2 t7 T( b. _# s) k) ^9 C
6 G1 A" @' i7 u2 d, ]# `上面所說出錯的203行內容為& i2 b& ~' {8 X% p4 a$ |: ^# d
@hp_sprite.bitmap.clear
4 |( v) y+ m- G4 U
; r& y/ _& R5 N% k v9 H2 g想知道怎麼解決! r1 m. [' Z( _1 w
- s4 y e1 W4 C, m$ b& u$ {該腳本支持3.82, `3 W/ Z _: a! Y
3 F1 f/ {7 @7 q" `: }下面是圖檔,要塞在Windowskin下( v& _# a( X2 G R4 j' d4 l9 Z. R4 r# }
- u/ t0 r2 T d
S_HUD_Graphic.rar
(12.36 KB, 下载次数: 49)
5 R6 |! i3 e6 G6 D' C; S" z
6 E' V* Y2 \. l1 v4 x9 ?
3 ]$ Q/ K1 e9 L* C* {0 Z
3 _' w& {$ Z, r |
|