Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| [Help] Tankentai + Star Script? | |
| 2012-01-20, 18:41 | [Help] Tankentai + Star Script? |
---|
ardo_96 Novice
Posts : 283 Thanked : 2 Engine : RMVX Ace Skill : Intermediate Type : Jack of All Trades
Awards:
| Sorry kalo judul tritnya kurang jelas. Begini, saya ingin minta bantuan ama RMer sekalian disini bisa ngga battle system Tankentai di kombinasikan dengan skrip Star STR, soalnya saya ingin menginginkan HUD skrip starnya di battle system Tankentai. Tankentai Star Script Oh ya sebagai info tambahan, sy menggunakan takentai standar tanpa ATB versi 3.4e http://www.rpgmakervx.net/index.php?showtopic=3781 dan skrip Star yg udah ditranslate oleh Speed@ http://www.rpgmakervx.net/index.php?showtopic=34197&st=0 Mohon maaf sebelumnya kalo request sy ini terlalu berlebihan. Trims. |
| | | 2012-01-20, 19:45 | Re: [Help] Tankentai + Star Script? |
---|
wltr3565 Senior
Posts : 870 Thanked : 28 Engine : RMVX Skill : Skilled Type : Scripter
Awards:
| Ada ATB Tankentai milik star kok. Cari aja Tankentai + STR ATB atau gimana. animasinya lebih lebay dan keren dari Enu punya ATB, tapi lebih ngebug =w=" |
| | | 2012-01-20, 21:21 | Re: [Help] Tankentai + Star Script? |
---|
yerry_great @> Moderator
Posts : 1251 Thanked : 15 Engine : Multi-Engine User Skill : Very Beginner Type : Jack of All Trades
| Ane juga susah banget dapetnya. Udah dpt Script + Gbr tapi ga bisa settingnya Padahal Tankentai ane juga mw pake Star Battle Status ATB juga. Ane dpt dlu gara" googling. Tapi lupa Lagian ane ga bsa pake. ga bsa tanya juga soalnya dptnya dri forum Spain |
| | | 2012-01-21, 18:34 | Re: [Help] Tankentai + Star Script? |
---|
ardo_96 Novice
Posts : 283 Thanked : 2 Engine : RMVX Ace Skill : Intermediate Type : Jack of All Trades
Awards:
| Udah ketemu nih skrip bwat edit HUD namanya STR33g1_BattleStatus... semua gambar yang dibutuhkan dah dikopi ke System.. tapi pas dicoba malah muncul error yang bikin bingung nih. ini kode skripnya: - Spoiler:
- Code:
-
#============================================================================== # ★RGSS2 # STR33g1_Battle Status 0.5 08/03/20 # # ・STR11e has the same specifications. # ★STR11eの後付ゲージプラグインを利用することができます。 # このスクリプトより下に導入してください。 # # ◇Features # ・Different HP/MP Gauge Flavor # ・"Rolling" Numbers # ・State Icon Cycle # # ◇Materials # This script requires several image skins. # Skin images are placed in the .Graphics\System folder. # # ・Main Skin # HP/MP Back Gauge Skin # No size limit. # ・HP/MP Gauge # Normally two gauges # Width = Unlimited # Height = Gauge Height(Optional) * 2 # 一列目に通常ゲージ、二列目に追尾ゲージを配置します。 # ・Numbers # 0123456789 is the order of number arrays # Width = One Frame Width(Any Size) * 10 # Height = Unlimited # ・State Skin # State Icon Main Skin # なにもステートが掛かっていない時は非表示になる仕様の為、 # Main skin is separate. # No size limit. # #============================================================================== # ■ Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Selectable # Skin File name BTSKIN_00 = "atb_Btskin_main" # Main Skin BTSKIN_01 = "atb_Btskin_hp" # HP(Gauge) BTSKIN_02 = "atb_Btskin_mp" # MP(Gauge) BTSKIN_04 = "Btskin_n00" # HP(Numbers) BTSKIN_05 = "Btskin_n00" # MP(Numbers) BTSKIN_03 = "atb_Btskin_state" # State # Skin coordinates[ x, y] BTSKIN_B_XY = [ 0, 0] # Standard Coordinates BTSKIN_00XY = [ 0, 0] # Main Skin BTSKIN_01XY = [134, 16] # HP(Gauge) BTSKIN_02XY = [220, 16] # MP(Gauge) BTSKIN_04XY = [148, 2] # HP(Numbers) BTSKIN_05XY = [232, 2] # MP(Numbers) BTSKIN_03XY = [104, 0] # State Skin BTSKIN_06XY = [104, 0] # State # Various Settings BTSKIN_01GS = 2 # HP Gauge Speed (Low values are fast) BTSKIN_02GS = 4 # MP Gauge Speed(Low values are fast) BTSKIN_04SS = 8 # HP Rolling Numbers Speed(Low values are fast) BTSKIN_05SS = 2 # MP Rolling Numbers Speed(Low values are fast) BTSKIN_04NS = 4 # HP Maximum Digits BTSKIN_05NS = 4 # MP Maximum Digits BTSKIN_06WH = [24,24] # [State Width, Height] BTSKIN_06SC = 2 # State Icon Scroll Speed # (Values close to 1 are fast) # バトルステータス座標 def set_xy @x = [] @y = [] for i in 0...$game_party.members.size x = 0 y = (i * 24) @x[i] = x + 16#+ STRRGSS2::ST_SX @y[i] = y + 16#+ STRRGSS2::ST_SY end end # 設定箇所ここまで @@f = false #-------------------------------------------------------------------------- # ★ エイリアス #-------------------------------------------------------------------------- alias initialize_str33 initialize def initialize(f = false) initialize_str33 unless @@f @f = @@f = true else @f = false end set_xy @s_sprite = [] @s_party = [] @s_lv = [] @opacity = 0 self.contents.dispose self.create_contents self.back_opacity = 0 self.opacity = 0 #@column_max = $game_party.actors.size @viewport = Viewport.new(0, 416-128, 416, 128) @hpgw = (Cache.system(BTSKIN_01)).width @mpgw = (Cache.system(BTSKIN_02)).width @viewport.z = self.z - 1 @state_opacity = [] @item_max = $game_party.members.size return unless @f for i in 0...@item_max draw_item(i) end update end #-------------------------------------------------------------------------- # ● リフレッシュ潰し #-------------------------------------------------------------------------- def refresh # :-) end #-------------------------------------------------------------------------- # ● ステートの描画 #-------------------------------------------------------------------------- def draw_actor_state(actor) icon = Cache.system("Iconset") w = actor.states.size * 24 w = 24 if w < 1 bitmap = Bitmap.new(w, BTSKIN_06WH[1]) count = 0 for state in actor.states icon_index = state.icon_index x = 24 * count rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) bitmap.blt(x, 0, icon, rect) count += 1 end return bitmap end #-------------------------------------------------------------------------- # ● 名前作成 #-------------------------------------------------------------------------- def name_bitmap(actor) bitmap = Bitmap.new(100, 24) bitmap.font.size = 16 bitmap.draw_text_f(0, 0, 100, 24, actor.name) return bitmap end #-------------------------------------------------------------------------- # ● ステート数取得 #-------------------------------------------------------------------------- def state_size(actor) return actor.states.size end #-------------------------------------------------------------------------- # ● アイテム作成 #-------------------------------------------------------------------------- def draw_item(index) return unless @f actor = $game_party.members[index] # @s_sprite[index] = [] s = @s_sprite[index] # メインスキン s[0] = Sprite.new(@viewport) s[0].bitmap = Cache.system(BTSKIN_00) s[0].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_00XY[0] s[0].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_00XY[1] s[0].z = 0 # HP s[1] = Sprite.new(@viewport) s[1].bitmap = Cache.system(BTSKIN_01) s[1].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0] s[1].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1] s[1].z = 4 w = s[1].bitmap.width h = s[1].bitmap.height / 2 s[1].src_rect.set(0, 0, w, h) s[2] = Sprite.new(@viewport) s[2].bitmap = Cache.system(BTSKIN_01) s[2].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0] s[2].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1] s[2].z = 3 s[2].src_rect.set(0, h, w, h) s[11] = 96 s[6] = Sprite_strNumbers.new(@viewport, BTSKIN_04, BTSKIN_04NS) s[6].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_04XY[0] s[6].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_04XY[1] s[6].z = 5 s[13] = actor.hp s[6].update(s[13]) # MP s[3] = Sprite.new(@viewport) s[3].bitmap = Cache.system(BTSKIN_02) s[3].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0] s[3].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1] s[3].z = 4 w = s[3].bitmap.width h = s[3].bitmap.height / 2 s[3].src_rect.set(0, 0, w, h) s[4] = Sprite.new(@viewport) s[4].bitmap = Cache.system(BTSKIN_02) s[4].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0] s[4].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1] s[4].z = 3 s[4].src_rect.set(0, h, w, h) s[12] = 56 s[7] = Sprite_strNumbers.new(@viewport, BTSKIN_05, BTSKIN_05NS) s[7].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_05XY[0] s[7].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_05XY[1] s[7].z = 5 s[14] = actor.mp s[7].update(s[14]) # ステート s[5] = Viewport.new(0, 0, BTSKIN_06WH[0], BTSKIN_06WH[1]) s[5].rect.x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_06XY[0] + @viewport.rect.x s[5].rect.y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_06XY[1] + @viewport.rect.y s[5].z = @viewport.z + 1 s[8] = Sprite.new(@viewport) s[8].bitmap = Cache.system(BTSKIN_03) s[8].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_03XY[0] s[8].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_03XY[1] s[8].z = -2 s[9] = Plane.new(s[5]) s[9].bitmap = draw_actor_state(actor) s[10] = state_size(actor) # 現在のステータスに s[11] = ((@hpgw * (actor.hp / (actor.maxhp * 1.0))) + 1).truncate if actor.maxmp != 0 s[12] = ((@mpgw * (actor.mp / (actor.maxmp * 1.0))) + 1).truncate else s[12] = 0 end s[15] = Sprite.new(@viewport) s[15].bitmap = name_bitmap(actor) s[15].x = @x[index] + 4 s[15].y = @y[index] + 2 s[15].z = 0 s[1].src_rect.width = s[11] s[2].src_rect.width = s[11] s[3].src_rect.width = s[12] s[4].src_rect.width = s[12] s[6].update(s[13]) s[7].update(s[14]) # 不可視に for l in [0,1,2,3,4,8,9,15] s[l].opacity = 0 end for l in [6,7] s[l].o = 0 end # 情報記憶 @s_lv[index] = actor.level @s_party[index] = [actor.name, actor.hp, actor.maxhp, actor.mp, actor.maxmp, actor.states] # end #-------------------------------------------------------------------------- # ● オブジェクト開放 #-------------------------------------------------------------------------- def dispose super return unless @f for i in 0...@s_sprite.size for l in [0,1,2,3,4,8,9,15] @s_sprite[i][l].bitmap.dispose @s_sprite[i][l].dispose end for l in [5,6,7] @s_sprite[i][l].dispose end end @@f = false end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super return unless @f for i in 0...@s_sprite.size s = @s_sprite[i] a = $game_party.members[i] m = @s_party[i] @state_opacity[i] = 0 if @state_opacity[i] == nil # 不透明度アップ @state_opacity[i] += 8 if @opacity < 272 @opacity += 8 for l in [0,1,2,3,4,15] s[l].opacity = @opacity end for l in [6,7] s[l].o = @opacity end end # 名前更新 if a.name != m[0] s[15].bitmap.dispose s[15].bitmap = name_bitmap(a) m[0] = a.name end # HP/MP更新 update_hp(s,a,m) update_mp(s,a,m) # ステート更新 if s[10] > BTSKIN_06WH[0] / 24 and (Graphics.frame_count % BTSKIN_06SC) == 0 s[9].ox += 1 end if s[10] > 0 and @state_opacity[i] < 272 for l in [8,9] s[l].opacity = @state_opacity[i] end end if a.states != m[5] m[5] = a.states s[9].ox = 0 s[9].bitmap.dispose s[9].bitmap = draw_actor_state($game_party.members[i]) s[10] = state_size($game_party.members[i]) @state_opacity[i] = 0 for l in [8,9] s[l].opacity = @state_opacity[i] end end end end #-------------------------------------------------------------------------- # ● フレーム更新 (HP) #-------------------------------------------------------------------------- def update_hp(s,a,m) # HPくるくる if a.hp != s[13] c = 0; c = 1 if a.hp < a.maxhp / 4; c = 2 if a.hp == 0 if s[13] > a.hp s[13] -= BTSKIN_04SS s[13] = a.hp if s[13] < a.hp else s[13] += BTSKIN_04SS s[13] = a.hp if s[13] > a.hp end s[6].update(s[13], c) end # HP if a.hp != m[1] s[11] = ((@hpgw * (a.hp / (a.maxhp * 1.0))) + 1).truncate m[1] = a.hp end sr = s[1].src_rect if sr.width != s[11] sp = BTSKIN_01GS sr.width = (s[11] + (s[1].src_rect.width * (sp - 1))) / sp sr.width = 2 if sr.width <= 1 and a.hp > 0 end sr = s[2].src_rect sp = 2 if sr.width != s[1].src_rect.width and (Graphics.frame_count % sp) == 0 if sr.width < s[1].src_rect.width sr.width += 1 else sr.width -= 1 end end sr.width = 2 if sr.width <= 1 and a.hp > 0 end #-------------------------------------------------------------------------- # ● フレーム更新 (MP) #-------------------------------------------------------------------------- def update_mp(s,a,m) # MPくるくる if a.mp != s[14] c = 0; c = 1 if a.mp < a.maxmp / 4 if s[14] > a.mp s[14] -= BTSKIN_05SS s[14] = a.mp if s[14] < a.mp else s[14] += BTSKIN_05SS s[14] = a.mp if s[14] > a.mp end s[7].update(s[14], c) end # MP if a.mp != m[3] if a.maxmp != 0 s[12] = ((@mpgw * (a.mp / (a.maxmp * 1.0))) + 1).truncate else s[12] = 0 end m[3] = a.mp end sr = s[3].src_rect if sr.width != s[12] sp = BTSKIN_02GS sr.width = (s[12] + (s[3].src_rect.width * (sp - 1))) / sp sr.width = 2 if sr.width <= 1 and a.mp > 0 end sr = s[4].src_rect sp = 2 if sr.width != s[3].src_rect.width and (Graphics.frame_count % sp) == 0 if sr.width < s[3].src_rect.width sr.width += 1 else sr.width -= 1 end end sr.width = 2 if sr.width <= 1 and a.mp > 0 end end
#============================================================================== # ■ Sprite_strNumber #============================================================================== class Sprite_strNumber < Sprite #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(v, gra, n = 0) @n = n super(v) self.bitmap = Cache.system(gra) @w = self.bitmap.width/10 @h = self.bitmap.height/3 self.src_rect = Rect.new(@n*@w, 0, @w, @h) end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update(n = -1, c = 0) @n = n self.src_rect.x = @n*@w self.src_rect.y = c*@h end end #============================================================================== # ■ Sprite_strNumbers #============================================================================== class Sprite_strNumbers attr_accessor :x attr_accessor :y attr_accessor :z attr_accessor :o #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(v, gra, n = 4, s = 0) @n = n # 桁数 @x = 0 @y = 0 @z = 0 @o = 255 @sprite = [] # 字間設定 b = Cache.system(gra) @s = b.width / 10 - s # スプライト作成 for i in 0...n @sprite[i] = Sprite_strNumber.new(v, gra) end update end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update(v = 0, c = 0) val = [] # 数値を配列に格納 for i in 0...@n if (10 ** (i)) == 0 val[i] = v % 10 else val[i] = v / (10 ** (i)) % 10 end end val = val.reverse # 先頭の0を取り除く for i in 0...@n if val[i] == 0 and @n != i + 1 val[i] = -1 else break end end # スプライト更新 for i in 0...@n @sprite[i].update(val[i], c) @sprite[i].x = @x + (i * @s) @sprite[i].y = @y @sprite[i].z = @z @sprite[i].opacity = @o end end #-------------------------------------------------------------------------- # ● 不透明度の適用 #-------------------------------------------------------------------------- def o=(val) @o = val for i in 0...@n @sprite[i].opacity = @o end end #-------------------------------------------------------------------------- # ● オブジェクト開放 #-------------------------------------------------------------------------- def dispose for i in 0...@sprite.size @sprite[i].bitmap.dispose @sprite[i].dispose end end end
|
| | | 2012-01-21, 19:17 | Re: [Help] Tankentai + Star Script? |
---|
privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Kalo saya lihat dari screenshotnya sih, itu karena saling ngeclash. Salah satu masalah yang paling sering dihadapi para Tankentai user. Tapi, setelah saya lihat dari method yang di overwrite Tankentai, gak ada tuh yang ngeoverwrite method draw_text atau draw_text_f.... Atau kalau tadi saya lihat dari scriptnya, memang tidak ada method definition dari draw_text_f di script itu. Alternatifnya : 1. Coba ganti draw_text_f jadi draw_text 2. Coba deh om Aldo lihat lagi, apakah ada script yang blum ke copy? 3. Kalo gak ya terpaksa, mesti minta scripter dewa buat kompatiblin ni 2 script... Sekian, thanks! - privateer |
| | | 2012-01-21, 19:43 | Re: [Help] Tankentai + Star Script? |
---|
ardo_96 Novice
Posts : 283 Thanked : 2 Engine : RMVX Ace Skill : Intermediate Type : Jack of All Trades
Awards:
| ok, dah sy coba draw_text_f diubah jadi "draw_text" akhirnya error hilang. Jadi, sekarang hanya perlu mengatur kordinat skinnya aja biar bisa kayak gamenya Hanzo Kimura.. tapi sayangnya mengatur HUD Battle nggak mudah My Game Punya Hanzo |
| | | 2012-01-21, 20:22 | Re: [Help] Tankentai + Star Script? |
---|
privateer Novice
Posts : 253 Thanked : 1 Engine : RMXP Skill : Advanced Type : Scripter
| Oh iya sih... soalnya kan, ni HUD seharusnya dipakai oleh ATBnya si Star... Jadi ya mungkin agak berantakan. Juga, setelah saya lihat, Method definitionnya ya di ATBnya Star. Tapi, jadinya bisa kan? ya udah deh... ni topic berarti solved kan, om? EDIT : agak OOT... Tapi, kayaknya saya tahu deh om, tool buat bantu om cari koordinat... nih : http://uglyhorst.de/rPG%20Maker/tools/imagepositioner.zip.... Itu bisa sekalian 2K/3 +XP + VX.... |
| | | 2012-01-21, 21:32 | Re: [Help] Tankentai + Star Script? |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| @ priv & om ardo : Setelah saya teliti, draw_text_f itu merupakan method yang didefine oleh Star untuk script-scriptnya agar compatible satu sama lain... So, pantes aja jadi berantakan... Untuk mengatur letak tulisan yang berantakan, tinggal configure X dan Y positionnya saja.. |
| | | 2012-01-24, 15:37 | Re: [Help] Tankentai + Star Script? |
---|
ardo_96 Novice
Posts : 283 Thanked : 2 Engine : RMVX Ace Skill : Intermediate Type : Jack of All Trades
Awards:
| Sundul lagi... ada problem lagi nih, jendela tankentai sama STR standarnya ga mau otomatis geser sesuai resolusi yg telah sy ganti ke 640 X 480 Atur kordinat skinnya sih ga masalah tapi atur jendela-jendela yg sy kasih tanda itu bagaimana? Info tambahan skrip yg sy gunakan bwat ganti reso pake ini: - Spoiler:
- Code:
-
#============================================================================== # ** Resolution Max #------------------------------------------------------------------------------ # by RMVX Master # 12-27-08 #============================================================================== # Important info! # Try to make your maps as big as possible or errors will appear! # Make your title graphic the same as your resolution. # Do not edit this script after the "Do Not Edit" Line! #============================================================================== # Set your resolution max is 640,480 Graphics.resize_screen(640,480) #Enter you Resolution (max is 640,480) #============================================================================== # Do Not Edit Passed Here! #==============================================================================
#============================================================================== # Sprite_Timer #==============================================================================
class Sprite_Timer < Sprite def initialize(viewport) super(viewport) self.bitmap = Bitmap.new(88, 48) self.bitmap.font.name = "Segoe UI" self.bitmap.font.size = 32 self.x = Graphics.width - self.bitmap.width self.y = 0 self.z = 200 update end end
#============================================================================== # ** Spriteset_Map #==============================================================================
class Spriteset_Map #-------------------------------------------------------------------------- # * Create Viewport #-------------------------------------------------------------------------- def create_viewports @viewport1 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport2 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport3 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport2.z = 50 @viewport3.z = 100 end end
#============================================================================== # ** Spriteset_Battle #==============================================================================
class Spriteset_Battle #-------------------------------------------------------------------------- # * Create Viewports 1-3 #-------------------------------------------------------------------------- def create_viewports @viewport1 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport2 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport3 = Viewport.new(0, 0, Graphics.width, Graphics.height) @viewport2.z = 50 @viewport3.z = 100 end #-------------------------------------------------------------------------- # * Create Battleback Sprite #-------------------------------------------------------------------------- def create_battleback source = $game_temp.background_bitmap bitmap = Bitmap.new(Graphics.width + 96, Graphics.height + 64) bitmap.stretch_blt(bitmap.rect, source, source.rect) bitmap.radial_blur(90, 12) $battleback_sprite = Sprite.new(@viewport1) $battleback_sprite.bitmap = bitmap $battleback_sprite.ox = 320 $battleback_sprite.oy = 240 $battleback_sprite.x = 272 $battleback_sprite.y = 176 $battleback_sprite.wave_amp = 8 $battleback_sprite.wave_length = 240 $battleback_sprite.wave_speed = 120 end #-------------------------------------------------------------------------- # Battle Floor Sprite creation #-------------------------------------------------------------------------- def create_battlefloor @battlefloor_sprite = Sprite.new(@viewport1) @battlefloor_sprite.bitmap = Cache.system("BattleFloor") @battlefloor_sprite.x = 0 @battlefloor_sprite.y = 192 @battlefloor_sprite.z = 1 @battlefloor_sprite.opacity = 128 end end
#============================================================================== # ** Game_Map #==============================================================================
class Game_Map #-------------------------------------------------------------------------- # * Scroll Setup #-------------------------------------------------------------------------- def setup_scroll @scroll_direction = 2 @scroll_rest = 0 @scroll_speed = 4 @margin_x = (width - (Graphics.width / 32)) * 256 / 2 @margin_y = (height - (Graphics.height / 32)) * 256 / 2 end #-------------------------------------------------------------------------- # * Calculate X coordinate for parallax display # bitmap : Parallax bitmap #-------------------------------------------------------------------------- def calc_parallax_x(bitmap) if bitmap == nil return 0 elsif @parallax_loop_x return @parallax_x / 16 elsif loop_horizontal? return 0 else w1 = bitmap.width - Graphics.width w2 = @map.width * 32 - Graphics.width if w1 <= 0 or w2 <= 0 return 0 else return @parallax_x * w1 / w2 / 8 end end end #-------------------------------------------------------------------------- # * Calculate Y coordinate for parallax display # bitmap : Parallax bitmap #-------------------------------------------------------------------------- def calc_parallax_y(bitmap) if bitmap == nil return 0 elsif @parallax_loop_y return @parallax_y / 16 elsif loop_vertical? return 0 else h1 = bitmap.height - Graphics.height h2 = @map.height * 32 - Graphics.height if h1 <= 0 or h2 <= 0 return 0 else return @parallax_y * h1 / h2 / 8 end end end #-------------------------------------------------------------------------- # * Scroll Down # distance : scroll distance #-------------------------------------------------------------------------- def scroll_down(distance) if loop_vertical? @display_y += distance @display_y %= @map.height * 256 @parallax_y += distance else last_y = @display_y @display_y = [@display_y + distance, (height - (Graphics.height / 32)) * 256].min @parallax_y += @display_y - last_y end end #-------------------------------------------------------------------------- # * Scroll Right # distance : scroll distance #-------------------------------------------------------------------------- def scroll_right(distance) if loop_horizontal? @display_x += distance @display_x %= @map.width * 256 @parallax_x += distance else last_x = @display_x @display_x = [@display_x + distance, (width - (Graphics.width / 32)) * 256].min @parallax_x += @display_x - last_x end end end
#============================================================================== # ** Game_Player #==============================================================================
class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Set Map Display Position to Center of Screen # x : x-coordinate # y : y-coordinate #-------------------------------------------------------------------------- def center(x, y) center_x = (Graphics.width / 2 - 16) * 8 center_y = (Graphics.width / 2 - 16) * 8 display_x = x * 256 - center_x # Calculate coordinates unless $game_map.loop_horizontal? # No loop horizontally? max_x = ($game_map.width - (Graphics.width / 32)) * 256 display_x = [0, [display_x, max_x].min].max # Adjust coordinates end display_y = y * 256 - center_y # Calculate coordinates unless $game_map.loop_vertical? # No loop vertically? max_y = ($game_map.height - (Graphics.height / 32)) * 256 display_y = [0, [display_y, max_y].min].max # Adjust coordinates end $game_map.set_display_pos(display_x, display_y) # Change map location end #-------------------------------------------------------------------------- # * Update Scroll #-------------------------------------------------------------------------- def update_scroll(last_real_x, last_real_y) center_x = (Graphics.width / 2 - 16) * 8 center_y = (Graphics.width / 2 - 16) * 8 ax1 = $game_map.adjust_x(last_real_x) ay1 = $game_map.adjust_y(last_real_y) ax2 = $game_map.adjust_x(@real_x) ay2 = $game_map.adjust_y(@real_y) if ay2 > ay1 and ay2 > center_y $game_map.scroll_down(ay2 - ay1) end if ax2 < ax1 and ax2 < center_x $game_map.scroll_left(ax1 - ax2) end if ax2 > ax1 and ax2 > center_x $game_map.scroll_right(ax2 - ax1) end if ay2 < ay1 and ay2 < center_y $game_map.scroll_up(ay1 - ay2) end end end
|
| | | 2012-01-24, 19:56 | Re: [Help] Tankentai + Star Script? |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| Itu soalnya VX memang tidak di design untuk resolusi 640 x 480... Coba atur width dan heightnya... |
| | | 2012-01-24, 20:33 | Re: [Help] Tankentai + Star Script? |
---|
ardo_96 Novice
Posts : 283 Thanked : 2 Engine : RMVX Ace Skill : Intermediate Type : Jack of All Trades
Awards:
| Sayangnya sy gak tau bagian kode buat mengatur biar pas jendelanya sesuai dengan reso 640 x 480. Keknya yg nih masalah reso terlalu rumit, lebih baik ke reso default aja. |
| | | 2012-01-25, 09:38 | Re: [Help] Tankentai + Star Script? |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| Sebenarnya gak terlalu suilt, cuma masalahnya susah dicari. Entar saya bantu deh om.. Sekarang gak bisa... |
| | | | Re: [Help] Tankentai + Star Script? |
---|
Sponsored content
| | | | | [Help] Tankentai + Star Script? | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|