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.

Quick Question: Waiting X Frames?

Is there a way to use the "Wait" event command in a script? Or something similar?

I know I could just start a loop and have it go for several hundred times but that wouldn't be as efficient as 'wait X number of frames before continuing'.
 
Well, if you need it in the map, you can use:
Code:
@wait_count += 20

If you need for other scene, try something like this:
Code:
class Scene_1
  def main
    @wait_count = 0
    #blah blah...
  end
  def update
    if @wait_count > 0
      @wait_count -= 1
      return
    end
    #blah blah...
  end
end
 
I guess I should have stated that I already tried:

if @wait_count > 0
@wait_count -= 1
return
end

...and I guess I also should've said I'm trying to get this to work in a battle system (Nick's TBS).

I've modified the TBS so that it can use Wachunga's Autoscroll to pan to the next unit instead of 'jumping' to it in a disorienting way...however I've been having trouble getting the damn thing to wait until the camera pan is complete before acting, thought that just waiting X frames would be the simplest solution but maybe not.
 

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