Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Pausing the Game during Animation

In previous RPG Makers, you could check an option so that the rest of the game would freeze while an animation played out. Is this possible in XP? Know of any code or regular stuff I'm missing?
Please help out if you know ^_^ Specifically I would like this done during battle.
 

poccil

Sponsor

Please explain the use of "animation" here. Is it a map animation, a battle animation, an animation played using an event command, or something else? There can be more than one correct answer in each case.
 
Hmm... Let me see here... I am not sure what you are asking, but I shall do my best. Let me know if this doesn't work. Just add it below Scene_Debug.

Code:
class Sprite_Battler
  def animation_playing?
    return @_animation != nil && @_loop_animation != nil
  end
end

class Spriteset_Battle
  def animation_playing?
    (@enemy_sprites + @actor_sprites).each do |sprite|
      next unless sprite.is_a?(Sprite_Battler)
      return true if sprite.animation_playing?
    end
    return false
  end
end

class Scene_Battle
  alias_method :seph_pausebattlewhenanimations_scnblt_up1, :update_phase1
  alias_method :seph_pausebattlewhenanimations_scnblt_up2, :update_phase2
  alias_method :seph_pausebattlewhenanimations_scnblt_up3, :update_phase3
  alias_method :seph_pausebattlewhenanimations_scnblt_up4, :update_phase4
  alias_method :seph_pausebattlewhenanimations_scnblt_up5, :update_phase5
  def update_phase1
    return if @spriteset.animation_playing?
    seph_pausebattlewhenanimations_scnblt_up1
  end
  def update_phase2
    return if @spriteset.animation_playing?
    seph_pausebattlewhenanimations_scnblt_up2
  end
  def update_phase3
    return if @spriteset.animation_playing?
    seph_pausebattlewhenanimations_scnblt_up3
  end
  def update_phase4
    return if @spriteset.animation_playing?
    seph_pausebattlewhenanimations_scnblt_up4
  end
  def update_phase5
    return if @spriteset.animation_playing?
    seph_pausebattlewhenanimations_scnblt_up5
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top