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.

Omg nice GUI .. Not

sdfryr.png


Wow dude I am trying to wait X amount of seconds and this GUI blows so bad it won't let me do that lol.. please teach me how to do this with code. Ty
 
To wait x seconds you enter the number of frames you'd like to wait (as you already are).
20 frames is supposed to = 1 second (pressing f1 should give you a bit of extra info on topics you have open). Though I find you usually need to try a few different wait times to get exactly what you're looking for.
 

Jason

Awesome Bro

Yeah Clockwise is right, on average, 20frames = 1 second, however, some computers will be slightly faster, some will be slightly slower, so some may only wait 3-4 seconds, while others have to wait 6-7 seconds.

Try working like this and see if it gives you the appropriate time gap.
 
Did you guys see the SS? I want the Frames to be random from 20 to 100 :X
When you say X amount, it does not really mean a fixed number... it's a variable >_>

Also wow.. that's interesting how it's random by default , lol. I am depending on them for my encounter system, in which you swing a weapon at monsters. And the Waits actually control the cooldown of your weapon. That's so funky if it's like random. jeez.
 
It's not "random", it's just not a perfect constant. You can get much closer to 'actual time' by dividing the current # of frames by the current frame rate. (@total_sec = Graphics.frame_count / Graphics.frame_rate). The Window_PlayTime class uses this to display the play time in seconds.

That being said, everything is relative. (if your wait time is slightly off, so is everything else (by the same amount))

Jbrist example suggests that there is a +-40% variance. I think this is highly unlikely unless you are running on a very old computer with a very slow processor, or you have drastically over-clocked your processor.

To use a script command to set a wait, just set

@wait_count = x

in this case, x will be at 40 frames / second
 
Good to know thanks! if what you say is true, then how can i implement this fix to make it more accurate? Do i like just init that script in a common event?

I tested @wait_count = rand(80) + 20 and it worked :D !!
 

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