Sleeping Leonhart Posted January 1, 2008 Share Posted January 1, 2008 (edited) Custom Pause PositionDescrizionePermette di personalizzare il cursore di pausa mostrato nei messaggi.AutoreThe Sleeping Leonhart, da un'idea di Ziel van Brand Script #============================================================================= # Custom Pause Position #============================================================================= # The Sleeping Leonhart # Versione 1.1 # 1-1-2008 #============================================================================= class Window_Message < Window_Selectable #-------------------------------------------------------------------------- # * Impostazioni #-------------------------------------------------------------------------- XPAUSA = 240 # Imposta la coordinata x del cursore di pausa YPAUSA = 144 # Imposta la coordinata y del cursore di pausa CURSORE_WINDOWSKIN = false # Se falso utilizza un cursore personalizzato #-------------------------------------------------------------------------- # * Impostazioni cursore personalizzato #-------------------------------------------------------------------------- INTERVALLO = 8 # Intervallo espresso in frames tra un frame e l'altro(20 = 1 secondo) NOME_PAUSA = "Pausa" # Nome del cursore di pausa custom, il cursore va inserito nella cartella Windowskin alias tsl_custommessagepause_initialize initialize #-------------------------------------------------------------------------- # * Inizializzazione Oggetti #-------------------------------------------------------------------------- def initialize tsl_custommessagepause_initialize @pausa = Sprite.new if CURSORE_WINDOWSKIN @pausa.bitmap = RPG::Cache.windowskin(@windowskin_name) @pausa.src_rect.set(160, 64, 16, 16) else @pausa.bitmap = RPG::Cache.windowskin(NOME_PAUSA) @pausa.src_rect.set(0, 0, @pausa.bitmap.height, @pausa.bitmap.height) end @pausa.visible = false @pausa.z = self.z + 1 @frame_pausa = 0 @i = 0 end #-------------------------------------------------------------------------- # * Aggiorna #-------------------------------------------------------------------------- alias tsl_custommessagepause_update update def update if @pausa.visible if CURSORE_WINDOWSKIN cursore_standard else cursore_custom end @pausa.x = x + XPAUSA @pausa.y = y + YPAUSA end tsl_custommessagepause_update end #-------------------------------------------------------------------------- # * Ricrea il cursore standard #-------------------------------------------------------------------------- def cursore_standard numero_frame = 5 case @frame_pausa when 0..4 @pausa.src_rect.set(160, 64, 16, 16) when 5..9 @pausa.src_rect.set(176, 64, 16, 16) when 10..14 @pausa.src_rect.set(160, 80, 16, 16) else @pausa.src_rect.set(176, 80, 16, 16) end @frame_pausa += 1 @frame_pausa %= 20 end #-------------------------------------------------------------------------- # * Crea un cursore personalizzato #-------------------------------------------------------------------------- def cursore_custom numeroframe = @pausa.bitmap.width / @pausa.bitmap.height numero_frame = INTERVALLO / numeroframe if @frame_pausa % INTERVALLO == 0 and @frame_pausa != 0 @pausa.src_rect.set(0+@i*@pausa.bitmap.height, 0, @pausa.bitmap.height, @pausa.bitmap.height) if @i == numeroframe-1 @i = 0 else @i+=1 end end @frame_pausa += 1 end #-------------------------------------------------------------------------- # * Setta la Pausa #-------------------------------------------------------------------------- def pause=(argomento) @pausa.visible = argomento end end Istruzioni per l'usoSi possono usare 2 tipi di cursore, quello della windowskin o uno personalizzato.Il cursore personalizzato può avere frame infiniti a differenza di quello della windowskin(che ne ha 4).Per creare un cursore custom bisogna usare lo stesso metodo che si usa per i battler di Ccoa, cioè l'altezza dell'immagine definisce la larghezza di ciascun frame, quindi la larghezza dell'immagine dovrà essere un multiplo dell'altezza.Se ad esempio vogliamo creare un cursore con 8 frame, ciascuno con larghezza 10 dobbiamo creare un immagine grande 800*10, ed ogni di pixel ci va inserito un frame.Per la configurazione guardate lo script. Edited March 14, 2013 by Flame http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
amivaleo Posted January 1, 2008 Share Posted January 1, 2008 ......!!! ma... ma...cioè...lo hai scritto tutto in 5 minuti o lo era uno script già pronto...? cioè...insomma...ecco... basta... mi hai mandato nel pallone... Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 1, 2008 Author Share Posted January 1, 2008 HAHAHA Si l'ho fatto in 5 minuti, infatti ci sarà qualche bug(spero di no), l'ho postato pensando fosse utile a qualcuno spero che non ti arrabbi perchè ti ho rubato l'idea... anzi ti metto nei crediti. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
amivaleo Posted January 1, 2008 Share Posted January 1, 2008 No, no, no!Lo script è tuo, lo hai realizzato con le tue capacità di scripter... ma... lo scripter che è dentro di me sta pinagendo dal furore... roso dall'invidia... Link to comment Share on other sites More sharing options...
André LaCroix Posted January 2, 2008 Share Posted January 2, 2008 Carino sìsì. (Sì, sono l'AnteroLehtinen che bazzica in chat. E... sì, una volta insegnavo storyboarding.)http://img26.imageshack.us/img26/7048/firmadn.png Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 3, 2008 Author Share Posted January 3, 2008 Ho aggiunto la possibilità di crearsi un cursore distaccato dalla wndowskin con una quantita di frame a piacere, se non capite le istruzioni ditemelo. http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
PinnaWarner Posted January 3, 2008 Share Posted January 3, 2008 Ciao, hai possibilità di postare uno screen??? Perchè non lo capito che fà, non ho poss di provarlo in questi giorni, grazie. Progetti:Cronache del Mondo Emerso RPGVX -in progettazione-Captain Tsubasa RPG 1 (Holly e Benji) RPG2k -ultimato-Captain Tsubasa RPG 2 (Holly e Benji) RPGXP -in lavorazione 10%-One Piece (All'arrembaggio) RPG2k -interrotto-The Leggend Of Dragons RPG2k -demo rilasciata-Arcadia Tactics RPGXP -demo rilasciata- ---> Visita il Mio Sito <--- Contest: http://rpg2s.net/gif/SCContest3Oct.gif - http://www.rpg2s.net/gif/GC_programmazione3.gif - http://www.rpg2s.net/gif/GC_premio2.gif - http://www.rpg2s.net/awards/bestpixel2.jpg Link to comment Share on other sites More sharing options...
Sleeping Leonhart Posted January 3, 2008 Author Share Posted January 3, 2008 In poche parole puoi cambiare posizione al cursore che ti indica che devi premere invio quando finisce un messaggio, ecco uno screen:http://img104.imageshack.us/img104/74/immagineca3.png http://img296.imageshack.us/img296/8784/csuserbarew2.pngScarica la Demo!Tutti i miei script(o quasi) li trovi Qui! Link to comment Share on other sites More sharing options...
amivaleo Posted January 3, 2008 Share Posted January 3, 2008 ... Leonheart...scusa... non te l'ho ancora detto e questo non è simpatico da parte mia, ma...beh... grazie davvero per lo script. Link to comment Share on other sites More sharing options...
PinnaWarner Posted January 3, 2008 Share Posted January 3, 2008 AH oky, capito tutto carino ^.^ Molto. Lo proverò presto. Progetti:Cronache del Mondo Emerso RPGVX -in progettazione-Captain Tsubasa RPG 1 (Holly e Benji) RPG2k -ultimato-Captain Tsubasa RPG 2 (Holly e Benji) RPGXP -in lavorazione 10%-One Piece (All'arrembaggio) RPG2k -interrotto-The Leggend Of Dragons RPG2k -demo rilasciata-Arcadia Tactics RPGXP -demo rilasciata- ---> Visita il Mio Sito <--- Contest: http://rpg2s.net/gif/SCContest3Oct.gif - http://www.rpg2s.net/gif/GC_programmazione3.gif - http://www.rpg2s.net/gif/GC_premio2.gif - http://www.rpg2s.net/awards/bestpixel2.jpg Link to comment Share on other sites More sharing options...
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