Squall_Leonheart Posted October 23, 2009 Share Posted October 23, 2009 Dunque,il mio problema è questo:Quando premo A per tornare alla mappa non mi elimina la picture,eccovi lo script(Lo script sarebbe una window picture che mostra i soldi su mappa alla pressione di A) #==============================================================================# ** Scene_Gold_Gold#============================================================================== class Scene_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) @gold = Sprite.new @gold.bitmap = Bitmap.new("Graphics/Pictures/HUD_GOLD") @gold.opacity = 170 refresh end if Input.trigger?(Input::A) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Map.new return end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(480, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = normal_color self.contents.draw_text(600-cx, 0, cx, 32, $data_system.words.gold, 2) endend Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 Guardati semplicemente il menù e guarda dove inserisce Input... Sicuramente non all'interno del initialize. http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 giver Posted October 24, 2009 Share Posted October 24, 2009 Lo script non è certamente congeniato e formulato correttamente, anche come ha detto MasterSion . . . Comunque, prova ad aggiungere questo metodo, tra gli ultimi due end dello script . . .def dispose @gold.bitmap.dispose @gold.dispose superended inserire questa istruzione prima del "ritorno" alla Mappa (Ma non sei nella mappa quando la fai apparire ?)self.dispose SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]http://www.rpg2s.net/forum/index.php/topic/21892-vintagevisualsrewrite-enhanced-revised-victory-screen-v-35-da-autori-vari-a-giver/ http://www.rpg2s.net/forum/index.php/topic/21868-eventing-utility-simple-last-battle-events-fix-v-30-by-giver/ http://www.rpg2s.net/forum/index.php/topic/21853-vintagerewrite-constance-menu-per-4-personaggi-da-team-constance-a-giver/ http://www.rpg2s.net/forum/index.php/topic/22126-vintagedoveroso-necroedit-dummy-title-22u-update-per-crearlo-ad-eventi-su-mappa-by-giver/ http://www.rpg2s.net/forum/index.php/topic/22127-vintagevisuals-tale-chapters-save-system-20-by-giver/ Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !! http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gifNon riesco a smettere di essere affascinato da immagini come questa . . .http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpgAlcuni wallpapers che faccio ruotare sul mio vecchio PC . . .http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpghttp://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpghttp://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpghttp://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . . BBCode TestingTypeface & Size Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 Poi conveniva mille volte usare una window e farla apparire nella scene_map (tutto molto più semplice). http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 24, 2009 Author Share Posted October 24, 2009 (edited) Allora,si ora mi sono accorto di avero scritto in maniera errata,ora è + logico:#==============================================================================# ** Scene_Gold_Gold#============================================================================== class Scene_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) @gold = Sprite.new @gold.bitmap = Bitmap.new("Graphics/Pictures/HUD_GOLD") @gold.opacity = 170 refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(480, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = normal_color self.contents.draw_text(600-cx, 0, cx, 32, $data_system.words.gold, 2) end def update_command if Input.trigger?(Input::A) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Map.new return end end end Poi,giver la tua soluzione non dà errori ma nemmeno risultati:/ quando ripremo A da trasparente l mette visibile:/ Riguardo la window,inizialmente avevo impostato in un evento che alla pressione di un tasto la window gold diventasse visibile e alla ripressione invisibile...Però non mi garbava la grafica quindi ho optato per questa soluzione...Ma non capisco perchè non si toglie l'immagine alla pressione:S :rovatfl: Per richiamare tramite evento ho scritto: Window_Gold = Scene_Gold.newWindow_Gold.visible = trueWindow_Gold.opacity = 0 E per toglierlo Window_Gold.visible = false Edited October 24, 2009 by Squall_Leonheart Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 Scusa ma perchè non vai nella scene_maprichiami la window_gold , cambi le cordinate e lo metti invisibile.Poi nel def update inserisci if Input.trigger?(Input::A) @window_gold.visible = !@window_gold.visibleend http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 24, 2009 Author Share Posted October 24, 2009 Allora questo l'ho fatto,il mio problema è che l'immagine di sfondo della window gold non scompare alla pressione del tasto che la rende invisibile#==============================================================================# ** Scene_Map#------------------------------------------------------------------------------# This class performs map screen processing.#============================================================================== class Scene_Map #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make sprite set @spriteset = Spriteset_Map.new # Make message window @message_window = Window_Message.new @window_gold = Scene_Gold.new # Transition run Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of sprite set @spriteset.dispose # Dispose of message window @message_window.dispose # If switching to title screen if $scene.is_a?(Scene_Title) # Fade out screen Graphics.transition Graphics.freeze end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Loop loop do # Update map, interpreter, and player order # (this update order is important for when conditions are fulfilled # to run any event, and the player isn't provided the opportunity to # move in an instant) $game_map.update $game_system.map_interpreter.update $game_player.update # Update system (timer), screen $game_system.update $game_screen.update # Abort loop if player isn't place moving unless $game_temp.player_transferring break end # Run place move transfer_player # Abort loop if transition processing if $game_temp.transition_processing break end end # Update sprite set @spriteset.update # Update message window @message_window.update # If game over if $game_temp.gameover # Switch to game over screen $scene = Scene_Gameover.new return end # If returning to title screen if $game_temp.to_title # Change to title screen $scene = Scene_Title.new return end # If transition processing if $game_temp.transition_processing # Clear transition processing flag $game_temp.transition_processing = false # Execute transition if $game_temp.transition_name == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $game_temp.transition_name) end end # If showing message window if $game_temp.message_window_showing return end # If encounter list isn't empty, and encounter count is 0 if $game_player.encounter_count == 0 and $game_map.encounter_list != [] # If event is running or encounter is not forbidden unless $game_system.map_interpreter.running? or $game_system.encounter_disabled # Confirm troop n = rand($game_map.encounter_list.size) troop_id = $game_map.encounter_list[n] # If troop is valid if $data_troops[troop_id] != nil # Set battle calling flag $game_temp.battle_calling = true $game_temp.battle_troop_id = troop_id $game_temp.battle_can_escape = true $game_temp.battle_can_lose = false $game_temp.battle_proc = nil end end end if Input.trigger?(Input::A) @window_gold.visible = !@window_gold.visible end # If B button was pressed if Input.trigger?(Input::B) # If event is running, or menu is not forbidden unless $game_system.map_interpreter.running? or $game_system.menu_disabled # Set menu calling flag or beep flag $game_temp.menu_calling = true $game_temp.menu_beep = true end end # If debug mode is ON and F9 key was pressed if $DEBUG and Input.press?(Input::F9) # Set debug calling flag $game_temp.debug_calling = true end # If player is not moving unless $game_player.moving? # Run calling of each screen if $game_temp.battle_calling call_battle elsif $game_temp.shop_calling call_shop elsif $game_temp.name_calling call_name elsif $game_temp.menu_calling call_menu elsif $game_temp.save_calling call_save elsif $game_temp.debug_calling call_debug end end end #-------------------------------------------------------------------------- # * Battle Call #-------------------------------------------------------------------------- def call_battle # Clear battle calling flag $game_temp.battle_calling = false # Clear menu calling flag $game_temp.menu_calling = false $game_temp.menu_beep = false # Make encounter count $game_player.make_encounter_count # Memorize map BGM and stop BGM $game_temp.map_bgm = $game_system.playing_bgm $game_system.bgm_stop # Play battle start SE $game_system.se_play($data_system.battle_start_se) # Play battle BGM $game_system.bgm_play($game_system.battle_bgm) # Straighten player position $game_player.straighten # Switch to battle screen $scene = Scene_Battle.new end #-------------------------------------------------------------------------- # * Shop Call #-------------------------------------------------------------------------- def call_shop # Clear shop call flag $game_temp.shop_calling = false # Straighten player position $game_player.straighten # Switch to shop screen $scene = Scene_Shop.new end #-------------------------------------------------------------------------- # * Name Input Call #-------------------------------------------------------------------------- def call_name # Clear name input call flag $game_temp.name_calling = false # Straighten player position $game_player.straighten # Switch to name input screen $scene = Scene_Name.new end #-------------------------------------------------------------------------- # * Menu Call #-------------------------------------------------------------------------- def call_menu # Clear menu call flag $game_temp.menu_calling = false # If menu beep flag is set if $game_temp.menu_beep # Play decision SE $game_system.se_play($data_system.decision_se) # Clear menu beep flag $game_temp.menu_beep = false end # Straighten player position $game_player.straighten # Switch to menu screen $scene = Scene_Menu.new end #-------------------------------------------------------------------------- # * Save Call #-------------------------------------------------------------------------- def call_save # Straighten player position $game_player.straighten # Switch to save screen $scene = Scene_Save.new end #-------------------------------------------------------------------------- # * Debug Call #-------------------------------------------------------------------------- def call_debug # Clear debug call flag $game_temp.debug_calling = false # Play decision SE $game_system.se_play($data_system.decision_se) # Straighten player position $game_player.straighten # Switch to debug screen $scene = Scene_Debug.new end #-------------------------------------------------------------------------- # * Player Place Move #-------------------------------------------------------------------------- def transfer_player # Clear player place move call flag $game_temp.player_transferring = false # If move destination is different than current map if $game_map.map_id != $game_temp.player_new_map_id # Set up a new map $game_map.setup($game_temp.player_new_map_id) end # Set up player position $game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y) # Set player direction case $game_temp.player_new_direction when 2 # down $game_player.turn_down when 4 # left $game_player.turn_left when 6 # right $game_player.turn_right when 8 # up $game_player.turn_up end # Straighten player position $game_player.straighten # Update map (run parallel process event) $game_map.update # Remake sprite set @spriteset.dispose @spriteset = Spriteset_Map.new # If processing transition if $game_temp.transition_processing # Clear transition processing flag $game_temp.transition_processing = false # Execute transition Graphics.transition(20) end # Run automatic change for BGM and BGS set on the map $game_map.autoplay # Frame reset Graphics.frame_reset # Update input information Input.update endend Questa è la Scene_Map modificata da me. Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 Ma perchè usi una scena?? Usa una window! E la picture inseriscila direttamente all'interno della window :rovatfl: http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 24, 2009 Author Share Posted October 24, 2009 [code="ruby"#==============================================================================# ** Window_Gold#------------------------------------------------------------------------------# This window displays amount of gold.#============================================================================== class Window_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) @gold = Sprite.new @gold.bitmap = Bitmap.new("Graphics/Pictures/HUD_GOLD") @gold.opacity = 170 refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = "Anime Ace 2.0 BB" cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = normal_color self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2) endend][/code] Fatto,questa è la window_gold modificata ma mi fa lo stesso difetto...Non scompare l'img Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 inserisci la picture in questo modo bitmap = RPG::Cache.picture("nome picture") self.contents.blt(22, 5 , bitmap, Rect.new(0, 0, 24, 24), 120)in ordine sono x, y, nome, rettangolo con (x, y, larghezza, altezza) e opacità. http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 24, 2009 Author Share Posted October 24, 2009 Non mi si vede proprio...appare solo il numero dei soldi e se scelgo la finestra...Ma la picture non la dispone proprio #==============================================================================# ** Window_Gold#------------------------------------------------------------------------------# This window displays amount of gold.#============================================================================== class Window_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) bitmap = RPG::Cache.picture("HUD_GOLD") self.contents.blt(640, 64 , bitmap, Rect.new(0, 0, 640, 64), 255) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = "Anime Ace 2.0 BB" cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(480, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = normal_color self.contents.draw_text(600-cx, 0, cx, 32, $data_system.words.gold, 2) endend Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 24, 2009 Share Posted October 24, 2009 Ma scusa metti tuttoe le scritte e i valori all'interno del def refresh e invece la picture nel def initialize a caso...Prova a mettere la picture dentro il def refresh http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 24, 2009 Author Share Posted October 24, 2009 Non mostra proprio + la picture Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
0 MasterSion Posted October 25, 2009 Share Posted October 25, 2009 (edited) Ok tagliamo la testa al toro...demoLe parti modificate presentano tre asterischi (***). All'interno delle scene trovi commenti abbastanza vistosi così impari a riprodurlo. Edited October 25, 2009 by MasterSion http://img256.imageshack.us/img256/7639/ihateyou.gifUn uomo senza religione è come un pesce senza bicicletta.http://img18.imageshack.us/img18/3668/decasoft1.pnghttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif Link to comment Share on other sites More sharing options...
0 Squall_Leonheart Posted October 25, 2009 Author Share Posted October 25, 2009 Ok ci sono riuscito grazie Iscriviti sul mio canale youtube -https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriberSeguimi su Instagram -https://www.instagram.com/ancestralguitarist/---------------------------------------------------------------------------------------------------------------------------------------Contest vinti---------------------------------------------------------------------------------------------------------------------------------------FACE CONTEST # 3BANNER CONTEST #69 Link to comment Share on other sites More sharing options...
Question
Squall_Leonheart
Dunque,il mio problema è questo:
Quando premo A per tornare alla mappa non mi elimina la picture,eccovi lo script(Lo script sarebbe una window picture che mostra i soldi su mappa alla pressione di A)
#==============================================================================# ** Scene_Gold_Gold#============================================================================== class Scene_Gold < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) @gold = Sprite.new @gold.bitmap = Bitmap.new("Graphics/Pictures/HUD_GOLD") @gold.opacity = 170 refresh end if Input.trigger?(Input::A) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Map.new return end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(480, 0, 120-cx-2, 32, $game_party.gold.to_s, 2) self.contents.font.color = normal_color self.contents.draw_text(600-cx, 0, cx, 32, $data_system.words.gold, 2) endendIscriviti sul mio canale youtube -
https://www.youtube.com/channel/UCYOxXExvlXiOFfYD1fTFpww?view_as=subscriber
Seguimi su Instagram -
https://www.instagram.com/ancestralguitarist/
---------------------------------------------------------------------------------------------------------------------------------------
Contest vinti
---------------------------------------------------------------------------------------------------------------------------------------
FACE CONTEST # 3
BANNER CONTEST #69
Link to comment
Share on other sites
14 answers 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