Vlue's Advanced Time Help...

Discussion in 'RGSSx Script Support' started by Red Metal, May 29, 2019.

  1. Red Metal

    Red Metal Metal Head Veteran

    Messages:
    31
    Likes Received:
    11
    Location:
    Manchester, UK
    First Language:
    english
    Primarily Uses:
    RMVXA
    Hello again. Yep, I have another issue that needs correcting;

    I recently had a go at installing Vlue's advanced time script, I managed to get my game to run in real time and have been messing around with lighting. I like the look of Victor Sant's shade script. Now...

    I'm trying to get different lights to turn on or off depending on the time of day (which again, is currently real time).
    So I had a go at adding my first event comments.
    Using V.M's Script Event Page Conditions v1.1 I made some switches that call this;

    Switch 1;
    SC: if GameTime.hour? > 7
    Control Switches: [0020MySwitch]=on

    Switch 2;
    SC: if GameTime.hour? > 18
    Control Switches: [0020MySwitch]=off

    I have my lights set up and they are correct. I followed a tutorial made by Vlue.

    OK so here is the problem.
    As I play my game I THINK the lights should do fine (not sure as I keep in real time!). But as I tested it this morning. If I enter my game at, say for example, 7:30am my lights are not on???

    Does this update ON the hour? If so my lights will not work as intended.

    So after 6pm my lights should turn off, and then at 7am they should turn back on
     
    #1
  2. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,476
    Likes Received:
    2,869
    Location:
    Philippines
    First Language:
    Tagalog
    Your condition is hour? > 7 (hour is greater than 7)

    Afaik, that will check only the hour itself, the minute is saved in a different variable and obtained via a different call. So during 7:30, the hour variable is still 7, which is not greater than 7, so your switch will not turn on yet.

    Try changing your condition to >= 7 (read as "greater than or equal to 7", do the same for the > 18) and see if they work now.
     
    #2
  3. Red Metal

    Red Metal Metal Head Veteran

    Messages:
    31
    Likes Received:
    11
    Location:
    Manchester, UK
    First Language:
    english
    Primarily Uses:
    RMVXA
    Aha, I see.
    Thank you.
    I thought it could have been an error on my part. I've just loaded up my game and my lights are on!
    I'll just have to set them an hour back or try what you say? Awesome.

    Aslo Engr. Adiktuzmiko I'm trying to use a "shade" that activates at night. This shade helps the night lights work as Im trying to add Victor Sant's lighting. It works but I want the shade I use with Advanced time as it gradiates over time. Victor's does not.
    When I create this event shade can I somehow tell it to look for existing shade. Or is there a better way to do all this?
     
    #3
  4. Engr. Adiktuzmiko

    Engr. Adiktuzmiko Chemical Engineer, Game Developer, Using BlinkBoy' Veteran

    Messages:
    14,476
    Likes Received:
    2,869
    Location:
    Philippines
    First Language:
    Tagalog
    Well, there could still be some other problems, but upon initial look at your post, the conditions are the most probable cause. You should test it out soon in case you're near 18:00.

    Im not versed in using Victor's scripts so I cant really help on that matter.
     
    #4
  5. Red Metal

    Red Metal Metal Head Veteran

    Messages:
    31
    Likes Received:
    11
    Location:
    Manchester, UK
    First Language:
    english
    Primarily Uses:
    RMVXA
    Well thank you for you help, I've done multiple tests and they are on every time. Pretty sure they will turn off too so I'm gonna continue messing with the shade to see what I can do for night time.

    It seems Victor's lights work as an alpha channel or similar by using black coloured lights that react against the shade colour. Different from my day lights. I really hope I can use the two together because normal lights that I've made seem to get dimmed by the shade. His Alpha lights dont lose luminosity, but they seem useless for daytime as they only react to dark? I could be wrong, only just started with this.
     
    #5

Share This Page