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.

HBGames

Hello Ppl!, I'm here to ask some questions:

Question I: About Waiting

I need to know how to make the script wait before going into the next line.
I used to do this:
@wait = 50

def something

if @wait > 0
@wait -= 1
else
do_something
end

but this ended up being to long, and therefore couldn't be applied to some cases.

So...How can I wait some time before going into the next line?

Question II: Flashing Screen!

color = Color.new(255, 255, 255, 255)
duration = 100
$game_screen.start_flash(color, duration)
I'm trying to do this work for my script, but the screen simply won't flash, what am I doing wrong? BTW, it's on a loop.

More Question Coming Soon (;

-Fallen.

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