Jump to content
Sign in to follow this  
GodsGunman

Time-Based Wait Instead of Frames?

Recommended Posts

I'm new to RPG Maker and I have searched on these forums and other places for about 20-25 minutes but to no avail.

 

If I want to make an event wait for x amount of seconds, is there a way to do that without relying on frames? I don't like the idea of not knowing exactly how long players will have to wait.

 

I'd rather not rely on a script if at all possible but if that is the last resort, are there any available?

 

Thanks.

Share this post


Link to post
Share on other sites

60 frames is the equivalent of 1 second.

Did you read the title or the content? I thought I made it pretty clear that I did not want to use frames which was the whole point of this post, is there any other way to wait for time to pass such as local time or something of the like?

Share this post


Link to post
Share on other sites

You could look into the Time functions.  Something like:

t = Time.now

@ts = t.sec + 5 if @ts.nil?

if t.sec >= @ts

 

end

 

but I've never tried that so not sure if it'll work.  But I don't see the point of not using frames.

Share this post


Link to post
Share on other sites

You could look into the Time functions.  Something like:

t = Time.now

@ts = t.sec + 5 if @ts.nil?

if t.sec >= @ts

 

end

 

but I've never tried that so not sure if it'll work.  But I don't see the point of not using frames.

 

Great, where can I find some more information on that? Is there documentation? Looks like exactly what I want.

 

I'm used to programming for things that have nothing to do with gaming so I don't know a lot about frames. My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you might be able to set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

Edited by GodsGunman

Share this post


Link to post
Share on other sites

 

60 frames is the equivalent of 1 second.

Did you read the title or the content? I thought I made it pretty clear that I did not want to use frames which was the whole point of this post, is there any other way to wait for time to pass such as local time or something of the like?

 

Graphics and events in the game progress at the speed of the frames, which is why wait uses them. I believed informing you the equivalent frame to seconds may assist you. Obviously it did not assist in the exact manner you wanted but there's really no need to get rude about it.

Share this post


Link to post
Share on other sites

 

 

60 frames is the equivalent of 1 second.

Did you read the title or the content? I thought I made it pretty clear that I did not want to use frames which was the whole point of this post, is there any other way to wait for time to pass such as local time or something of the like?

 

Graphics and events in the game progress at the speed of the frames, which is why wait uses them. I believed informing you the equivalent frame to seconds may assist you. Obviously it did not assist in the exact manner you wanted but there's really no need to get rude about it.

 

Galv, did you not read the title? Why would you assume someone can multiply and divide by 60?

 

:)

Share this post


Link to post
Share on other sites

I think Galv gave the best answer actually.

 

I don't know but, aren't all math educated people knows how to divide by 60 and multiply by 60?

 

Every computer has a calculator - for those that aren't math educated.

Share this post


Link to post
Share on other sites

 

I think Galv gave the best answer actually.

 

I don't know but, aren't all math educated people knows how to divide by 60 and multiply by 60?

 

Every computer has a calculator - for those that aren't math educated.

 

 

and that too.

Share this post


Link to post
Share on other sites

I don't understand your gripe with Frames, Edit GodsGunman (I screwed that up, wooooh, sry Dym). I'd prefer Frames since they have more pinpoint control rather than seconds (where you're always stuck with 60 frames). If you feel that the Event using the Wait Command will be blocked by other events, then make it a Common Event (Common Events can continue running in different maps fyi). The only issue with the Wait Command is that the timing will change based on how high the FPS the Engine is running, which can be lowered by low system specs and/or ludicrous amounts of processing within the engine itself (100 Events in a 20x20 Map playing an animation).

Edited by AJNR

Share this post


Link to post
Share on other sites

 

 

60 frames is the equivalent of 1 second.

Did you read the title or the content? I thought I made it pretty clear that I did not want to use frames which was the whole point of this post, is there any other way to wait for time to pass such as local time or something of the like?

 

Graphics and events in the game progress at the speed of the frames, which is why wait uses them. I believed informing you the equivalent frame to seconds may assist you. Obviously it did not assist in the exact manner you wanted but there's really no need to get rude about it.

 

 

I legitimately tried being the least amount of rude that I possibly could but I mean come on, you clearly did not take even a couple seconds to understand what I was asking and just gave the default answer anytime someone asks about the wait command lol.

 

You also have almost 5000 posts and are a moderator, you see me then ask Quasi about the Time functions that he posted about and choose not to help out, either by saying there is no such thing, you'll look into it, or where to find more info on it. That's not being very helpful.

 

 

Does anyone have any relevant information to what Quasi was saying in regards to time functions? So far that seems to be the way to go. If anyone needs a reminder on why I do not want to use frames, I'll post this again:

 

 

 

 

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you might be able to set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

Share this post


Link to post
Share on other sites
 

 

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you might be able to set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

 

Pretty sure VX Ace caps at 60 FPS at default iirc

Share this post


Link to post
Share on other sites

 

 

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you might be able to set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

 

Pretty sure VX Ace caps at 60 FPS at default iirc

 

Okay but as I said that only fixes half the problem lol

Share this post


Link to post
Share on other sites

So what is the problem? Do you just want to be clarified about the information in Quasi's post? Because if the problem is that you don't want to use frames, it's like saying "I want to cook chicken, but I don't want to use my stove".

Share this post


Link to post
Share on other sites

So what is the problem? Do you just want to be clarified about the information in Quasi's post? Because if the problem is that you don't want to use frames, it's like saying "I want to cook chicken, but I don't want to use my stove".

For example, look at this: http://docs.oracle.com/javase/tutorial/essential/concurrency/sleep.html

In java there's a sleep function where you can put in the milliseconds that you want the thread to wait/sleep/stop/whatever. Is there nothing like this supported in rpg maker?

 

I just looked up the sleep function for ruby: http://apidock.com/ruby/Kernel/sleep

Would something like that be automatically supported since rpg maker runs ruby? As I said I'm new to RPG maker so I'm not sure how custom coding works with it.

Share this post


Link to post
Share on other sites

Time Class.

 

For example:

time = Time.now

it runs the following functions:

 

min, sec, hour, mday, mon, year, wday

 

for example that you want to add in Time, you can just do a conditional branch if you like.

 

That is just a reference that I gave. You can find it easier to do branching which time passed etc or Sleep method.

Share this post


Link to post
Share on other sites
//Pause for 4 seconds
            Thread.sleep(4000);

Looks synonymous with 240 Frames (60 to make 1 second), since I believe those are milliseconds (1000 to make 1 second).

Time.new    #=> 2008-03-08 19:56:19 +0900
sleep 1.2   #=> 1
Time.new    #=> 2008-03-08 19:56:20 +0900
sleep 1.9   #=> 2
Time.new    #=> 2008-03-08 19:56:22 +0900

I believe that this sleep function only pauses the timer for a set time, instead of acting as a timer itself.

 

Don't take my word for it, I'm not a scripter. But Soulpour and Galv are much more able to help you.

Share this post


Link to post
Share on other sites

Time Class.

 

For example:

time = Time.now

it runs the following functions:

 

min, sec, hour, mday, mon, year, wday

 

for example that you want to add in Time, you can just do a conditional branch if you like.

 

That is just a reference that I gave. You can find it easier to do branching which time passed etc or Sleep method.

Ah, so using something like this will work for using seconds instead of frames for the passing of time? Is there a place that shows how to do this since it requires custom coding, which I haven't done yet with RPG maker?

 

//Pause for 4 seconds
            Thread.sleep(4000);

Looks synonymous with 240 Frames (60 to make 1 second), since I believe those are milliseconds (1000 to make 1 second).

Time.new    #=> 2008-03-08 19:56:19 +0900
sleep 1.2   #=> 1
Time.new    #=> 2008-03-08 19:56:20 +0900
sleep 1.9   #=> 2
Time.new    #=> 2008-03-08 19:56:22 +0900

I believe that this sleep function only pauses the timer for a set time, instead of acting as a timer itself.

 

Don't take my word for it, I'm not a scripter. But Soulpour and Galv are much more able to help you.

 

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you can set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

Basically if you have a slow computer and RPG Maker isn't set up to skip frames for slow computers, then you'll get a long wait instead of a short wait. If you use time instead of frames, then it doesn't matter how slow/fast your computer is, everyone will have the same experience.

Share this post


Link to post
Share on other sites

You can do a Conditional Branch where you're going to check the time. but first, in the event box, make a script call:

 

time = Time.now

 

and do a conditional branch to check if

 

time.sec is equal to how many seconds

or time.min is equal to how many minutes

Share this post


Link to post
Share on other sites

I legitimately tried being the least amount of rude that I possibly could but I mean come on, you clearly did not take even a couple seconds to understand what I was asking and just gave the default answer anytime someone asks about the wait command lol.

I'm sorry, I don't understand why you are are trying to justify your rudeness. Yes this is the default answer because using frames is the ideal way to do it.

 

You also have almost 5000 posts and are a moderator, you see me then ask Quasi about the Time functions that he posted about and choose not to help out, either by saying there is no such thing, you'll look into it, or where to find more info on it. That's not being very helpful.

Just to clear something up that you don't understand, being a moderator has nothing to do with helping people with RPGMaker support. Moderators here don't get paid and this forum isn't the official forum of the rpgmaker software. Our job is to make sure people follow the rules and be nice to each other.

 

You are not entitled to get help. Nobody is obligated to help you. Members (and mods) of the community do it in their own time for free, so if you are rude to someone they might not want to spend their time to help any more.

 

I only ask for you to please be nice while you are here. Thank you.

Share this post


Link to post
Share on other sites

I use this site for most of my ruby references:

http://www.ruby-doc.org/core-2.1.0/Time.html

 

Has some usage examples of the Time function

 

 

Basically if you have a slow computer and RPG Maker isn't set up to skip frames for slow computers, then you'll get a long wait instead of a short wait. If you use time instead of frames, then it doesn't matter how slow/fast your computer is, everyone will have the same experience.

 

I've been curious about this too.  Been thinking of rewriting a few of my waits in my scripts.  But I wasn't sure if rmvxa skipped frames or not. 

Share this post


Link to post
Share on other sites

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you can set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

Basically if you have a slow computer and RPG Maker isn't set up to skip frames for slow computers, then you'll get a long wait instead of a short wait. If you use time instead of frames, then it doesn't matter how slow/fast your computer is, everyone will have the same experience.

No, just because you're conditioning on a factor that is independent of the machine, that doesn't mean everyone's going to have the experience.

 

If you want to give the player 60 seconds to escape a dungeon, but my system is significantly slower than your system, I'm going to find that my time is running out much faster than you just because my game runs slower.

 

That's not the "same experience".

Edited by Tsukihime

Share this post


Link to post
Share on other sites

 

 

 

60 frames is the equivalent of 1 second.

Did you read the title or the content? I thought I made it pretty clear that I did not want to use frames which was the whole point of this post, is there any other way to wait for time to pass such as local time or something of the like?

 

Graphics and events in the game progress at the speed of the frames, which is why wait uses them. I believed informing you the equivalent frame to seconds may assist you. Obviously it did not assist in the exact manner you wanted but there's really no need to get rude about it.

 

 

I legitimately tried being the least amount of rude that I possibly could but I mean come on, you clearly did not take even a couple seconds to understand what I was asking and just gave the default answer anytime someone asks about the wait command lol.

 

You also have almost 5000 posts and are a moderator, you see me then ask Quasi about the Time functions that he posted about and choose not to help out, either by saying there is no such thing, you'll look into it, or where to find more info on it. That's not being very helpful.

 

 

Does anyone have any relevant information to what Quasi was saying in regards to time functions? So far that seems to be the way to go. If anyone needs a reminder on why I do not want to use frames, I'll post this again:

 

 

 

 

My understanding is if someone has a very slow or very fast computer, 60 frames will go by a lot slower or faster than what I want it to. Sure you might be able to set a limit to how high fps can go, but that only fixes half the problem, and even if slow computers just skip frames to catch up, it's still not exact like seconds/milliseconds are.

 

 

 

If you're going to be a dick to people trying to help you, you don't deserve to keep your topic open. Besides, your answer has been given. The default uses frames. You could try and ask in script request to see if it's possible to get around this, but if it's hardcoded into the maker then I doubt there will be any way without breaking the source code.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×