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.

Wait for animation, music/SE tempo, message wait, etc.

This is just three questions at once so I wouldn't have to create multiple threads.

1a. Is there a way for the event to not continue until the Show Animation finishes without using the Wait event command? Like, there's some talking, then an animation plays and the next person's Show Message won't appear until after the animation finishes playing.

1b. And for Show Animation to focus on the screen instead of one player/event (the animation plays but now you won't see the sprites flashing because of it)?

2. Is there any script that brings back the Tempo function from RM2K/3? Tempo changes how fast/slow the music or sound effect plays. Pitch just changes how the music/sound effect sounds but is basically the same speed.

3. How do I get other events to stop processing (i.e. other sprites stop moving) during a Show Message? That option was removed from RMXP.
 

ccoa

Member

1a. Not by default. However, you always know exactly how many frames an animation is by looking at the animation in the database, so a Wait for exactly that many frames will do the trick.

1b. Nope. Make a copy of the animation and take out the sprite flashing part, and show that one instead.

2. Don't think so. Very little has been done with audio because Audio is a hidden class.

3. You mean sprites already executing a move route? No way that I know of, you'd need a script, and I don't believe one has been written.
 
ccoa;255554 said:
1a. Not by default. However, you always know exactly how many frames an animation is by looking at the animation in the database, so a Wait for exactly that many frames will do the trick.

Darn, I figured. Maybe it's possible through a call script of that animation?

1b. Nope. Make a copy of the animation and take out the sprite flashing part, and show that one instead.

Heh, kinda figured that, too. I was just hoping there'd be a less tedious way.

2. Don't think so. Very little has been done with audio because Audio is a hidden class.

Blast.

3. You mean sprites already executing a move route? No way that I know of, you'd need a script, and I don't believe one has been written.

Yeah, like if a sprite randomly moves around (like a townsperson) or follows you (like an on-screen enemy), reading a message on a sign or something would make them stop.

So a script is needed. I'm almost sure there was a script line in Scene_Map or someplace that temporarily halts other events (except you/the event you're on) depending on what's going on, but I can't remember it. Can't see for myself since I'm not at home.


Thankies.
 
Code:
#==========================================================================
# ** SG Animation Wait
#==========================================================================
# sandgolem 
# Version 1
# 13.02.07
#==========================================================================
#
# To check for updates or find more scripts, visit:
# http://www.gamebaker.com/rmxp/scripts/
#
# Instructions:
#   http://www.gamebaker.com/rmxp/scripts/animation-wait.htm
#
# Have problems? Official topic:
#   http://forums.gamebaker.com/showthread.php?t=868
#
#==========================================================================

if Object.const_defined?('SDK')
  SDK.log('SG Animation Wait', 'sandgolem', 1, '13.02.07')
  @sg_animationwait_disabled = true if !SDK.state('SG Animation Wait')
end

if !@sg_animationwait_disabled
#--------------------------------------------------------------------------
class Game_Character
  attr_accessor :sg_charactersprite
end

class Sprite_Character
  alias_method :sg_animationwait_initialize, :initialize  
  def initialize(viewport, character = nil)
    sg_animationwait_initialize(viewport,character)
    character.sg_charactersprite = self
  end
  
  def sg_setanimation
    if @character.animation_id != 0
      animation = $data_animations[@character.animation_id]
      animation(animation, true)
      @character.animation_id = 0
    end
  end
end

class Interpreter
  alias_method :sg_animationwait_c207, :command_207
  def command_207
    sg_animationwait_c207
    get_character(@parameters[0]).sg_charactersprite.sg_setanimation
    return true
  end
end

class Scene_Map
  attr_accessor :spriteset_map
end

Try that. Credit to sandgolem.
 
For #2, the pitch which you play audio files directly effects tempo. If you play at 150 pitch, the file will play at 1.5 times normal speed. The exception to this is MIDI files, where pitch just changes the event pitch handlers.

hope that helps.
 
Yeyinde;255587 said:
For #2, the pitch which you play audio files directly effects tempo. If you play at 150 pitch, the file will play at 1.5 times normal speed. The exception to this is MIDI files, where pitch just changes the event pitch handlers.

hope that helps.

If you mean MP3s, making the pitch higher doesn't increase the speed (that I've noticed; I tried "What I'm Made Of" from Sonic Heroes, "Fight to the Death" from Kingdom Hearts II, and "Make a Challenge" from Dragon Warrior III, if you're curious). However, making the pitch lower DOES slow down the speed of the songs (in addition to changing how it sounds).

I wonder why RMXP's pitch doesn't speed up/slow down the tempo in MIDIs.

By the way, it looks like I WOULD need the SDK to get the script to work; I just tried it now and I got an error in Line 69: "return false if !$scene.spriteset.sg_animationwait"

I'd rather not have SDK in mah scripts, though. So I'll either have to luck out and find a non-SDK version, or try and do meself.
 

ccoa

Member

I believe the only file format it works on is wav files. I don't know for sure, though, because while it saves on filesize, it seriously decreases sound quality, so I've never done it. And I didn't want to say anything if I didn't know. :p
 

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