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 [X] Amount of frames

Depends...

Code:
@wait_count = frames

where frames is the number of frames to wait

that is if the scene has a wait count check within its update method a section of code that looks like this
Code:
    # If waiting
    if @wait_count > 0
      # Decrease wait count
      @wait_count -= 1
      return
    end

An alternative would be to use sleep(seconds) but that pauses EVERYTHING most of the time you usually don't want that


Oh since it is a call script the above code @wait_count = frames is fine. but if it was another scene outside of call script then the above explanation applies
 

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