Jump to content
Vlue

Advanced Game Time

Recommended Posts

i'm trying to get it to not show up in my intro maps.

not sure if i understand how to use the script call, so it's most likely user error.

you just put

GameTime.clock?(false) in an event using the advanced script option right?

 

oops im really bad at this forgot to tell how its not working.

it makes me think its working because clock disappears, but the moment you press enter,space bar, or left click it

comes back, click again it goes away, again it comes back. my intro has people talking so you have to press those

to get through. and its really annoying having a clock appear and disappear in the back ground.

 

what did i do wrong?

Edited by SolarPhantom

Share this post


Link to post
Share on other sites

THANK YOU!

i didn't realize that.

mainly cause i know zip about ruby -_-. (i only know a bit of VB and a lot of QB)

that brings me back up to speed.

Share this post


Link to post
Share on other sites

Sir i`m kindly thinking if there is a script call that calls an event in the current time???

Ex: I created an event in the time 7:02 a.m and it will close at 8:02 am. And the event will always continue every 7:02 am even if he finished or not the event??? If there is, how can i do that and if it`s none can you make an update sir??? THANKS GREAT SCIRPT!!!

Share this post


Link to post
Share on other sites

You can use conditional branches to activate certain pages of an event based on what time it is. GameTime.min? and GameTime.hour? returns the current minute and hour respectively.

Share this post


Link to post
Share on other sites

Hey Vlue, it would be cool if you added the option to have the tint off by default in the next version. It's just that most of my maps are actually interior maps that don't use tinting, so I end up using a whole lot of Notint commands when I would only have to use a few commands for just tinting.

Share this post


Link to post
Share on other sites

Vlue, I'd like to incorporate this into a scriptlet into the script:

 

#~     if $game_time > 360 and $game_time <= 1020
#~         $game_switches[87] = true
#~         $game_switches[82] = false
#~     end
#~     if $game_time <= 360 or $game_time > 1020
#~         $game_switches[87] = false
#~         $game_switches[82] = true

 

I made this for the old script, so that every time night time or day time hit, a switch indicating which time it was would get flipped... what would be a good way to incorporating them into the new script? I'm less than a beginner at this, so XD

Edited by Maus Merryjest

Share this post


Link to post
Share on other sites

I don't know if anyone still reads this stuff, but I'm trying to do what Vlue posted earlier about the having events happen during certain game time. I used the command he gave but every time i try to do something relevant such as talk I get a undefined method for hours. I also tried running shop same way but it closes during the time in which i have it to open..has anyone figured out away to correctly do this? this was a main idea I was having to put in my game to play around with..but with this problem it's quite depressing. Can anyone give me some advice? it be much appreciated ty

Share this post


Link to post
Share on other sites

It's hour? not hours. i.e. GameTime.hour?

If your shop is closed when it should be open and open when it should be closed then just flip the commands around~

Share this post


Link to post
Share on other sites

ok I have my blacksmith place to open at 8AM and to close at 10Pm, i used the following conditional branch GameTime.hour? > 8 or GameTime.hour? < 22 in the test box and under that  open the door and transfer and under else, to inform the play that the place is closed. but now with in game the store stays open the whole time and my bar place i have to open at night just keeps displaying the message of being closed even though its open. Am I still doing somethign wrong or am I messing up? I'm not really sure as my pub one did work before. the blacksmith one though has never worked, ty for response.

Share this post


Link to post
Share on other sites

OK I replaced those commands and it is working just fine ty so much! but one thing I noticed is for my pub it only will work if i have the or between them. So i'm guessing if the first number is larger the second it requires or instead of and? but it works fine now ty so much for your help!

Share this post


Link to post
Share on other sites

Hey Vlue, I didn't know if you still were active on the forums. I'm trying to use this script but everytime I run it I get an error

saying  line 492: NoMethodError occured undefined method 'shade' for #<Game_Screen:0xc267544>. I've been using the old basic night and day script for the time being but I figured I'd investigate to find out what went wrong.

Share this post


Link to post
Share on other sites

ima, do you have it set to use a certain tint of another script such as khas light effect or the victor engine? when i first started it was set to true which gave me the same error. if you set both to false it should work as mine does. all i kno might help

 

to Vlue i have one last question, ive tried using the command to move the clock but no matter what x or y coords i put in there it still stays in top left?

Share this post


Link to post
Share on other sites
ima, do you have it set to use a certain tint of another script such as khas light effect or the victor engine? when i first started it was set to true which gave me the same error. if you set both to false it should work as mine does. all i kno might help

 

to Vlue i have one last question, ive tried using the command to move the clock but no matter what x or y coords i put in there it still stays in top left?

Nope, I get the same error when trying it with a new project with no other scripts being used. I wonder if It might have something to do with the computer model i'm using. I know it sounds silly but it's the only other thing I can think of. 

Share this post


Link to post
Share on other sites
Vlue, I'd like to incorporate this into a scriptlet into the script:

 

#~     if $game_time > 360 and $game_time <= 1020

#~         $game_switches[87] = true

#~         $game_switches[82] = false

#~     end

#~     if $game_time <= 360 or $game_time > 1020

#~         $game_switches[87] = false

#~         $game_switches[82] = true

 

I made this for the old script, so that every time night time or day time hit, a switch indicating which time it was would get flipped... what would be a good way to incorporating them into the new script? I'm less than a beginner at this, so XD

I made the following change (lines 705 - 712) to update in the SceneMap class:

  def update
    game_time_map_update
    if GameTime.hour? > 8 and GameTime.hour? <= 22
       $game_switches[87] = true
       $game_switches[82] = false
    end
    if GameTime.hour? <= 8 or GameTime.hour? > 22
        $game_switches[87] = false
        $game_switches[82] = true
    end
    return unless USECLOCK
    @gametimeclock.update unless SceneManager.scene != self
    if Input.trigger?(CLOCK_TOGGLE) and @gametimeclock.nil? == false
      @gametimeclock.visible ? @gametimeclock.visible = false : @gametimeclock.visible = true
      $gametimeclockvisible = @gametimeclock.visible
    end
  end

 

The above code I found starting at line 703. It sets the switches if the time is 8am to 10 pm, and unsets them otherwise.

I kind of think that there might be a better way to do this but this is working for me at least for now. Hope that helps you. :)

 
Edited by CT Bolt

Share this post


Link to post
Share on other sites
Hey Vlue, I didn't know if you still were active on the forums. I'm trying to use this script but everytime I run it I get an error

saying  line 492: NoMethodError occured undefined method 'shade' for #<Game_Screen:0xc267544>. I've been using the old basic night and day script for the time being but I figured I'd investigate to find out what went wrong.

Yah, I forgot to set USE_VICTOR to false when I copy pasted the last update into there, which is causing that problem, just set it to false in the customization or grab a new fixed copy from the pastebin.

ima, do you have it set to use a certain tint of another script such as khas light effect or the victor engine? when i first started it was set to true which gave me the same error. if you set both to false it should work as mine does. all i kno might help

 

to Vlue i have one last question, ive tried using the command to move the clock but no matter what x or y coords i put in there it still stays in top left?

Hmm, what command to move the clock? All I know of is changing the x, y in the customization options.

Share this post


Link to post
Share on other sites

you are right. my fault for wording wrong. I tried setting it up using the x and y coords in the script but no matter what values I put there it always remains in the top left corner. I would like to move it to the top left to avoid blocking the popup that appears when changing maps. also im using khas light effects and the clock dims at night with everything else how can i change this? I read around and changed the opacity value but dont understand that one quite well. thank you.

Share this post


Link to post
Share on other sites

CLOCK_X = 544 - CLOCK_WIDTH

CLOCK_Y = 0

 

would be the coords for top right.

As for the dimming clock.. just add below line 519 'self.z = 250' without the quotes.

Share this post


Link to post
Share on other sites

Sorry to disturb you Vlue but i cant seem to find the command in your script that configures the x,y position of the clock in the menu. Its currently blocking my gold window. D;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted