Mentre nel secondo Light Effects ho problemi,avendo anche 2 script simili per la luce(mettendo commenti è possibile impostare il punto da cui parte la luce e l ombra del personaggio)ma con quest'ultimo script Light Effects mi dà errori con gli altri due script...se mi potete dare una mano ve ne sarei grato ^___^
Question
Uomo Solitario
Ho alcuni problemi con questi due script,nel primo non è un vero problema ma vorrei cambiare il colore della scrittura(essendo
celeste è poco visibile)e non riesco a capire dalle righe dove cambiare ecco lo script:
#======================================================================# ¡ Window_RingMenu#==============================================================================#==============================================================================# Edited by MakirouAru#==============================================================================class Window_RingMenu < Window_Base#--------------------------------------------------------------------------# › ƒNƒ‰ƒX’è”#--------------------------------------------------------------------------STARTUP_FRAMES = 20 # ‰ŠúƒAƒjƒ[ƒVƒ‡ƒ“‚̃tƒŒ[ƒ€”MOVING_FRAMES = 5 # ƒŠƒ“ƒO‚ð‰ñ‚µ‚½Žž‚̃tƒŒ[ƒ€”RING_R = 64 # ƒŠƒ“ƒO‚Ì”¼ŒaICON_ITEM = RPG::Cache.icon("034-Item03") # uƒAƒCƒeƒ€vƒƒjƒ…[‚̃AƒCƒRƒ“ICON_SKILL = RPG::Cache.icon("044-Skill01") # uƒXƒLƒ‹vƒƒjƒ…[‚̃AƒCƒRƒ“ICON_EQUIP = RPG::Cache.icon("001-Weapon01") # u‘•”õvƒƒjƒ…[‚̃AƒCƒRƒ“ICON_STATUS = RPG::Cache.icon("050-Skill07") # uƒXƒe[ƒ^ƒXvƒƒjƒ…[‚̃AƒCƒRƒ“ICON_SAVE = RPG::Cache.icon("038-Item07") # uƒZ[ƒuvƒƒjƒ…[‚̃AƒCƒRƒ“ICON_EXIT = RPG::Cache.icon("046-Skill03") # uI—¹vƒƒjƒ…[‚̃AƒCƒRƒ“ICON_DISABLE= RPG::Cache.icon("") # Žg—p‹ÖŽ~€–Ú‚É•t‚ƒAƒCƒRƒ“SE_STARTUP = "056-Right02" # ƒƒjƒ…[‚ðŠJ‚¢‚½‚Æ‚«‚ɖ‚炷SEMODE_START = 1 # ƒXƒ^[ƒgƒAƒbƒvƒAƒjƒ[ƒVƒ‡ƒ“MODE_WAIT = 2 # ‘Ò‹@MODE_MOVER = 3 # ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“MODE_MOVEL = 4 # ”½ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“#--------------------------------------------------------------------------# › ƒAƒNƒZƒT#--------------------------------------------------------------------------attr_accessor :index#--------------------------------------------------------------------------# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»#--------------------------------------------------------------------------def initialize( center_x, center_y )super(0, 0, 640, 480)self.contents = Bitmap.new(width-32, height-32)self.contents.font.name = "Rockwell"self.opacity = 0self.back_opacity = 0s1 = "Zaino"s2 = "Abilità"s3 = "Equip."s4 = "Stats"s5 = "Salva"s6 = "Esci"@commands = [ s1, s2, s3, s4, s5, s6 ]@item_max = 6@index = 0@items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ]@disabled = [ false, false, false, false, false, false ]@cx = center_x - 16@cy = center_y - 16setup_move_startrefreshend#--------------------------------------------------------------------------# œ ƒtƒŒ[ƒ€XV#--------------------------------------------------------------------------def updatesuperrefreshend#--------------------------------------------------------------------------# œ ‰æ–ÊÄ•‰æ#--------------------------------------------------------------------------def refreshself.contents.clear# ƒAƒCƒRƒ“‚ð•‰æcase @modewhen MODE_STARTrefresh_startwhen MODE_WAITrefresh_waitwhen MODE_MOVERrefresh_move(1)when MODE_MOVELrefresh_move(0)end# ƒAƒNƒeƒBƒu‚ȃRƒ}ƒ“ƒh–¼•ަrect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32)self.contents.draw_text(rect, @commands[@index],1)end#--------------------------------------------------------------------------# › ‰æ–ÊÄ•‰æ(‰Šú‰»Žž)#--------------------------------------------------------------------------def refresh_startd1 = 2.0 * Math::PI / @item_maxd2 = 1.0 * Math::PI / STARTUP_FRAMESr = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMESfor i in 0...@item_maxj = i - @indexd = d1 * j + d2 * @stepsx = @cx + ( r * Math.sin( d ) ).to_iy = @cy - ( r * Math.cos( d ) ).to_idraw_item(x, y, i)end@steps -= 1if @steps < 1@mode = MODE_WAITendend#--------------------------------------------------------------------------# › ‰æ–ÊÄ•‰æ(‘Ò‹@Žž)#--------------------------------------------------------------------------def refresh_waitd = 2.0 * Math::PI / @item_maxfor i in 0...@item_maxj = i - @indexx = @cx + ( RING_R * Math.sin( d * j ) ).to_iy = @cy - ( RING_R * Math.cos( d * j ) ).to_idraw_item(x, y, i)endend#--------------------------------------------------------------------------# › ‰æ–ÊÄ•‰æ(‰ñ“]Žž)# mode : 0=”½ŽžŒv‰ñ‚è 1=ŽžŒv‰ñ‚è#--------------------------------------------------------------------------def refresh_move( mode )d1 = 2.0 * Math::PI / @item_maxd2 = d1 / MOVING_FRAMESd2 *= -1 if mode != 0for i in 0...@item_maxj = i - @indexd = d1 * j + d2 * @stepsx = @cx + ( RING_R * Math.sin( d ) ).to_iy = @cy - ( RING_R * Math.cos( d ) ).to_idraw_item(x, y, i)end@steps -= 1if @steps < 1@mode = MODE_WAITendend#--------------------------------------------------------------------------# œ €–Ú‚Ì•‰æ# x :# y :# i : €–Ú”Ô†#--------------------------------------------------------------------------def draw_item(x, y, i)#p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_srect = Rect.new(0, 0, @items[i].width, @items[i].height)if @index == iself.contents.blt( x, y, @items[i], rect )if @disabled[@index]self.contents.blt( x, y, ICON_DISABLE, rect )endelseself.contents.blt( x, y, @items[i], rect, 128 )if @disabled[@index]self.contents.blt( x, y, ICON_DISABLE, rect, 128 )endendend#--------------------------------------------------------------------------# œ €–ڂ𖳌ø‚É‚·‚é# index : €–Ú”Ô†#--------------------------------------------------------------------------def disable_item(index)@disabled[index] = trueend#--------------------------------------------------------------------------# › ‰Šú‰»ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ#--------------------------------------------------------------------------def setup_move_start@mode = MODE_START@steps = STARTUP_FRAMESif SE_STARTUP != nil and SE_STARTUP != ""Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100)endend#--------------------------------------------------------------------------# › ‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ#--------------------------------------------------------------------------def setup_move_move(mode)if mode == MODE_MOVER@index -= 1@index = @items.size - 1 if @index < 0elsif mode == MODE_MOVEL@index += 1@index = 0 if @index >= @items.sizeelsereturnend@mode = mode@steps = MOVING_FRAMESend#--------------------------------------------------------------------------# › ƒAƒjƒ[ƒVƒ‡ƒ“’†‚©‚Ç‚¤‚©#--------------------------------------------------------------------------def animation?return @mode != MODE_WAITendend#==============================================================================# ¡ Window_MenuStatus#------------------------------------------------------------------------------# @ƒƒjƒ…[‰æ–ʂŃp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚𕎦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B#============================================================================== class Window_RingMenuStatus < Window_Selectable#--------------------------------------------------------------------------# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»#--------------------------------------------------------------------------def initializesuper(204, 64, 232, 352)self.contents = Bitmap.new(width - 32, height - 32)refreshself.active = falseself.index = -1end#--------------------------------------------------------------------------# œ ƒŠƒtƒŒƒbƒVƒ…#--------------------------------------------------------------------------def refreshself.contents.clearself.contents.font.name = "Lucida Calligraphy"@item_max = $game_party.actors.sizefor i in 0...$game_party.actors.sizex = 80y = 80 * iactor = $game_party.actors[i]draw_actor_graphic(actor, x - 40, y + 80)draw_actor_name(actor, x, y + 24)endend#--------------------------------------------------------------------------# œ ƒJ[ƒƒ‹‚Ì‹éŒXV#--------------------------------------------------------------------------def update_cursor_rectif @index < 0self.cursor_rect.emptyelseself.cursor_rect.set(0, @index * 80, self.width - 32, 80)endendend#==============================================================================# #¡ Scene_RingMenu# ¡ Scene_Menu#------------------------------------------------------------------------------# @ƒƒjƒ…[‰æ–ʂ̈—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B#============================================================================== #class Scene_RingMenuclass Scene_Menu#--------------------------------------------------------------------------# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»# menu_index : ƒRƒ}ƒ“ƒh‚̃J[ƒƒ‹‰ŠúˆÊ’u#--------------------------------------------------------------------------def initialize(menu_index = 0)@menu_index = menu_indexend#--------------------------------------------------------------------------# œ ƒƒCƒ“ˆ—#--------------------------------------------------------------------------def main# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬@spriteset = Spriteset_Map.new# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬px = $game_player.screen_x - 15py = $game_player.screen_y - 24@command_window = Window_RingMenu.new(px,py)@command_window.index = @menu_index# ƒp[ƒeƒBl”‚ª 0 l‚Ìê‡if $game_party.actors.size == 0# ƒAƒCƒeƒ€AƒXƒLƒ‹A‘•”õAƒXƒe[ƒ^ƒX‚𖳌ø‰»@command_window.disable_item(0)@command_window.disable_item(1)@command_window.disable_item(2)@command_window.disable_item(3)end@command_window.z = 100# ƒZ[ƒu‹ÖŽ~‚Ìê‡if $game_system.save_disabled# ƒZ[ƒu‚𖳌ø‚É‚·‚é@command_window.disable_item(4)end# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬@status_window = Window_RingMenuStatus.new@status_window.x = 160@status_window.y = 0@status_window.z = 200@status_window.visible = false# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀsGraphics.transition# ƒƒCƒ“ƒ‹[ƒvloop do# ƒQ[ƒ€‰æ–Ê‚ðXVGraphics.update# “ü—Íî•ñ‚ðXVInput.update# ƒtƒŒ[ƒ€XVupdate# ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’fif $scene != selfbreakendend# ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õGraphics.freeze# ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú@spriteset.dispose# ƒEƒBƒ“ƒhƒE‚ð‰ð•ú@command_window.dispose@status_window.disposeend#--------------------------------------------------------------------------# œ ƒtƒŒ[ƒ€XV#--------------------------------------------------------------------------def update# ƒEƒBƒ“ƒhƒE‚ðXV@command_window.update@status_window.update# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_command ‚ðŒÄ‚Ôif @command_window.activeupdate_commandreturnend# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_status ‚ðŒÄ‚Ôif @status_window.activeupdate_statusreturnendend#--------------------------------------------------------------------------# œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)#--------------------------------------------------------------------------def update_command# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.trigger?(Input::B)# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t$game_system.se_play($data_system.cancel_se)# ƒ}ƒbƒv‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Map.newreturnend# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.trigger?(Input::C)# ƒp[ƒeƒBl”‚ª 0 l‚ÅAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚Ìê‡if $game_party.actors.size == 0 and @command_window.index < 4# ƒuƒU[ SE ‚ð‰‰‘t$game_system.se_play($data_system.buzzer_se)returnend# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒƒ‹ˆÊ’u‚Å•ªŠòcase @command_window.indexwhen 0 # ƒAƒCƒeƒ€# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒAƒCƒeƒ€‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Item.newwhen 1 # ƒXƒLƒ‹# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é@command_window.active = false@status_window.active = true@status_window.visible = true@status_window.index = 0when 2 # ‘•”õ# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é@command_window.active = false@status_window.active = true@status_window.visible = true@status_window.index = 0when 3 # ƒXƒe[ƒ^ƒX# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é@command_window.active = false@status_window.active = true@status_window.visible = true@status_window.index = 0when 4 # ƒZ[ƒu# ƒZ[ƒu‹ÖŽ~‚Ìê‡if $game_system.save_disabled# ƒuƒU[ SE ‚ð‰‰‘t$game_system.se_play($data_system.buzzer_se)returnend# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒZ[ƒu‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Save.newwhen 5 # ƒQ[ƒ€I—¹# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒQ[ƒ€I—¹‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_End.newendreturnend# ƒAƒjƒ[ƒVƒ‡ƒ“’†‚È‚çƒJ[ƒƒ‹‚̈—‚ðs‚í‚È‚¢return if @command_window.animation?# ªor© ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.press?(Input::UP) or Input.press?(Input::LEFT)$game_system.se_play($data_system.cursor_se)@command_window.setup_move_move(Window_RingMenu::MODE_MOVEL)returnend# «or¨ ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT)$game_system.se_play($data_system.cursor_se)@command_window.setup_move_move(Window_RingMenu::MODE_MOVER)returnendend#--------------------------------------------------------------------------# œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡)#--------------------------------------------------------------------------def update_status# B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.trigger?(Input::B)# ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t$game_system.se_play($data_system.cancel_se)# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é@command_window.active = true@status_window.active = false@status_window.visible = false@status_window.index = -1returnend# C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ꂽê‡if Input.trigger?(Input::C)# ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒƒ‹ˆÊ’u‚Å•ªŠòcase @command_window.indexwhen 1 # ƒXƒLƒ‹# ‚±‚̃AƒNƒ^[‚Ìs“®§ŒÀ‚ª 2 ˆÈã‚Ìê‡if $game_party.actors[@status_window.index].restriction >= 2# ƒuƒU[ SE ‚ð‰‰‘t$game_system.se_play($data_system.buzzer_se)returnend# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒXƒLƒ‹‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Skill.new(@status_window.index)when 2 # ‘•”õ# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ‘•”õ‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Equip.new(@status_window.index)when 3 # ƒXƒe[ƒ^ƒX# Œˆ’è SE ‚ð‰‰‘t$game_system.se_play($data_system.decision_se)# ƒXƒe[ƒ^ƒX‰æ–Ê‚ÉØ‚è‘Ö‚¦$scene = Scene_Status.new(@status_window.index)endreturnendendendMentre nel secondo Light Effects ho problemi,avendo anche 2 script simili per la luce(mettendo commenti è possibile impostare il punto da cui parte la luce e l ombra del personaggio)ma con quest'ultimo script Light Effects mi dà errori con gli altri due script...se mi potete dare una mano ve ne sarei grato ^___^
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now