Jump to content
Rpg²S Forum
  • 0

Modifica Moghunter Ougi Animation


lupius
 Share

Question

Uella! Avete presente quello splendido scriptuccio di Moghunter per cui, associate due immagini ad un personaggio, quando si lanciano determinate abilità in battaglia queste immagini compaiono rendendo uno splendido senso di onnipotenza? Ecco. Il problema, per quanto mi riguarda, è che le immagini sono legate a chi lancia l'abilità e possono essere al massimo 2 per personaggio (2 immagini coprono una sola abilità). Ergo, se ad "Attacco" ho assegnato da visualizzare le immagini legate a Erik, solo con Erik verranno visualizzate. Inoltre, Erik non potrà visualizzare che quelle.

 

Bene. Qui sotto lo script:

 

 

Animation#==============================================================================# +++ MOG - Ougi Animation  (v1.1) +++#==============================================================================# By Moghunter # http://www.atelier-rgss.com/#==============================================================================# Apresenta uma animação em pictures antes de ativar alguma ação.#==============================================================================# Serão necessários os seguintes arquivos na pasta Graphics/Battler/.## BATTLER_NAME_ougi1.png# BATTLER_NAME_ougi2.png##==============================================================================# Para ativar a animação basta colocar o seguinte comentário na caixa de notas# da skill ou itens.## <Ougi Animation>##==============================================================================module MOG_OUGI_ANIMATION  #Definição do som ao ativar a animação.    SOUND_FILE = "Flash2"  end#==============================================================================# ● Histórico (Version History)#==============================================================================# v 1.1 - Compatibilidade com o script de pause.#==============================================================================#==============================================================================# ■ Scene_Battle#==============================================================================class Scene_Battle < Scene_Base    #--------------------------------------------------------------------------  # ● Use Item  #--------------------------------------------------------------------------  alias mog_sp_animation_use_item use_item  def use_item      update_sp_animation      mog_sp_animation_use_item   end    #--------------------------------------------------------------------------  # ● Can SP Animation?  #--------------------------------------------------------------------------      def can_sp_animation?      skill = @subject.current_action.item      return true if skill.note =~ /<Ougi Animation>/      return false  end    #--------------------------------------------------------------------------  # ● Update SP Animation  #--------------------------------------------------------------------------    def update_sp_animation      return unless can_sp_animation?       special_animation = Ougi_Animation.new(@subject)      loop do          special_animation.update          Graphics.update          Input.update          break if special_animation.phase == 3      end      special_animation.dispose  endend#==============================================================================# ■ Ougi Animation#==============================================================================class Ougi_Animation    include MOG_OUGI_ANIMATION   attr_accessor :phase    #--------------------------------------------------------------------------  # ● Initialize  #--------------------------------------------------------------------------      def initialize(subject)      @phase = 0      create_battler_sprite(subject)      create_background_sprite(subject)      if @phase != 3         Audio.se_play("Audio/SE/" + SOUND_FILE.to_s, 100, 100) rescue nil       end           end        #--------------------------------------------------------------------------  # ● Create Background  #--------------------------------------------------------------------------        def create_background_sprite(subject)      @background_sprite = Sprite.new      bname = subject.name + "_ougi2"      @background_sprite.bitmap = Cache.battler(bname,0) rescue nil            @background_sprite.z = 1000      @background_sprite.opacity = 0      @background_sprite.zoom_x = 1.00      @background_sprite.zoom_y = 1.00      if @background_sprite.bitmap != nil         @background_sprite.ox = @background_sprite.bitmap.width / 2         @background_sprite.oy = @background_sprite.bitmap.height / 2         @background_sprite.x = @background_sprite.ox          @background_sprite.y = @background_sprite.oy      end      @phase = @background_sprite.bitmap != nil ? 0 : 3   end    #--------------------------------------------------------------------------  # ● Create Battler Sprite  #--------------------------------------------------------------------------        def create_battler_sprite(subject)      @battler_sprite = Sprite.new      bname = subject.name + "_ougi1"      @battler_sprite.bitmap = Cache.battler(bname,0) rescue nil      @battler_sprite.z = 1001      @battler_org = [0,0]      if @battler_sprite.bitmap != nil         @battler_sprite.ox = @battler_sprite.bitmap.width / 2         @battler_sprite.oy = @battler_sprite.bitmap.height / 2         px = @battler_sprite.ox  + ((Graphics.width / 2) - (@battler_sprite.bitmap.width / 2))         @battler_sprite.y = @battler_sprite.oy + (Graphics.height - @battler_sprite.bitmap.height)         @battler_org = [px - 130,px]         @battler_sprite.x = @battler_org[0]      end     @battler_sprite.zoom_x = 2     @battler_sprite.zoom_y = 2     @battler_sprite.opacity = 0     @phase = @battler_sprite.bitmap != nil ? 0 : 3       end           #--------------------------------------------------------------------------  # ● Dispose  #--------------------------------------------------------------------------      def dispose      dispose_battler_sprite      dispose_background_sprite  end    #--------------------------------------------------------------------------  # ● Dispose Battler Sprite  #--------------------------------------------------------------------------        def dispose_battler_sprite      return if @battler_sprite == nil      if @battler_sprite.bitmap != nil         @battler_sprite.bitmap.dispose         @battler_sprite.bitmap = nil      end      @battler_sprite.dispose      @battler_sprite = nil      end      #--------------------------------------------------------------------------  # ● Dispose Background Sprite  #--------------------------------------------------------------------------          def dispose_background_sprite      return if @background_sprite == nil      if @background_sprite.bitmap != nil         @background_sprite.bitmap.dispose          @background_sprite.bitmap = nil      end        @background_sprite.dispose      @background_sprite = nil  end      #--------------------------------------------------------------------------  # ● Update  #--------------------------------------------------------------------------      def update      if $mog_rgss3_pause != nil         update_pause if MOG_PAUSE::PAUSE_SCENE_BATTLE      end      return if @phase == 3      case @phase        when 0; update_start        when 1; update_slide        when 2; update_end       end     @background_sprite.zoom_x += 0.004     @background_sprite.zoom_y = @background_sprite.zoom_x  end      #--------------------------------------------------------------------------  # ● Update Start  #--------------------------------------------------------------------------        def update_start      @battler_sprite.zoom_x -= 0.03      @battler_sprite.opacity += 5      @background_sprite.opacity += 10      @battler_sprite.x += 3      if @battler_sprite.zoom_x <= 1.00         @battler_sprite.zoom_x = 1.00         @battler_sprite.opacity = 255         @background_sprite.opacity = 255         @phase = 1      end         @battler_sprite.zoom_y = @battler_sprite.zoom_x   end          #--------------------------------------------------------------------------  # ● Update Slide  #--------------------------------------------------------------------------          def update_slide      @battler_sprite.x += 1      @phase = 2 if @battler_sprite.x >= @battler_org[1]  end  #--------------------------------------------------------------------------  # ● Update End  #--------------------------------------------------------------------------          def update_end      @battler_sprite.zoom_x += 0.03      @battler_sprite.zoom_y = @battler_sprite.zoom_x      @battler_sprite.opacity -= 5      @background_sprite.opacity -= 5      @phase = 3 if @battler_sprite.opacity <= 0  end    end$mog_rgss_ougi_animation = true

 

 

Quello che vorrei chiedervi è se è possibile trasformarlo facendo in modo che le immagini rispondano all'abilità e non a chi la lancia. In questo modo risolverei tutti e due i problemi in un colpo. E' possibile, secondo voi? Pliiiiiiiiiiis.... help....

 

EDIT: guardandolo bene, in effetti non importerebbe che si legasse alle abilità se riuscissi ad aumentare a mio piacimento il numero delle immagini che lo script va a pescare. Se, quindi, potessi inserire anche delle immagini BATTLER_NAME_Ougi3.png, e via discorrendo con 4, 5 ecc... Come faccio a dire allo script di accettarle? Ho provato in qualche modo ma non ci sono riuscito... So che devo andare a lavorare nella sezione "Create Background" e "Create Battler Sprite", ma lì non riesco più ad andare avanti... forse sbaglio a scrivere l'elenco...

 

EDIT 2: purtroppo anche la soluzione che ho scritto sopra non servirebbe a nulla... che idiota che sono... A questo punto vi chiedo se è possibile chiudere il topic, probabilmente è più semplice trovarne uno ex novo piuttosto che pasticciarne uno già esistente... Per me si può chiudere.

Edited by lupius

"Lo trasformerò in una pulce. Un'innocua, piccola pulce. Poi metterò la pulce in una scatola; e la scatola dentro un'altra scatola! Quindi spedirò la scatola a me stessa e quando arriverà.... HAHAHAHA!! LA SPIACCICHERO' CON UN MARTELLO! E' una splendida, splendida idea, geniale direi!! .......... No.... Troppi francobolli..."

 

- Izma - "Le follie dell'imperatore"

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...