Reset event after 1 day in game.

● ARCHIVED · READ-ONLY
Started by Hatake-hime 8 posts View original ↗
  1. I have a place you can mine iron from.


    I would like to allow use of the mining to be like 3 times a day.


    Once that three is up, I would put a switch on or something to prevent more mining.


    But how can I reset the switch after a day?


    I am using a time system in my game, (Vlue) and would like to reset it at like 6am the next day.


    Any help?
  2. There's a time variable set in vlue's script. if you can figure out which it is (default is variable 1)
    Then you can set a conditional event page to the value 6.
    It's probably best if you use individual switches for the mining event, not self switches. that way you can turn them all off.(unless you have that script which manages self switches like normal switches) after you have that, make a common event that checks for 6 variable, then put a conditional branch into it for switch "RESET"(should be an individual switch) thats constantly checking for the time. into the else portion of the RESET, put this: if its 6 am, it instantly turns off all the switches used in the previous day, then activate a switch called reset, then at 7 am have it turn it off. This way it won't keep resetting while its 6 am, it only resets once.
    I hope you understood my crap way of explaining :p

    Heres a picture just in case. I forgot to put the reset off switch into a 7 variable conditional there but oh well.
    YW2uDF6.png
  3. Hey thanks! I'm gonna try that and I'll post my finding later. :guffaw:


    I am such a newb when it comes to variables and switches.


    edit: THANKS SO MUCH FOR THE PHOTO <3


    I have a bit of a mental issue when it comes with numbers and words together so THIS HELPS SO MUCH for reference! Thank you!
  4. Okay! I'm back with a question, haha. Other than this, it seems straight forward.


    I just currently can't find his variable that's written. I would like to change it from 1 because I have other variables already.


    Do you know where it could be?
  5. Hatake-hime said:
    Hey thanks! I'm gonna try that and I'll post my finding later. :guffaw:


    I am such a newb when it comes to variables and switches.


    edit: THANKS SO MUCH FOR THE PHOTO <3


    I have a bit of a mental issue when it comes with numbers and words together so THIS HELPS SO MUCH for reference! Thank you!


    Hatake-hime said:
    Okay! I'm back with a question, haha. Other than this, it seems straight forward.


    I just currently can't find his variable that's written. I would like to change it from 1 because I have other variables already.


    Do you know where it could be?

    No problem, and i'm crap at explaining with them so i felt the need to add the image :D
    As for the variable, in the version of the script I saw (this link), the variable line you can edit is line 84. just go into script editor, search for the line and change it into the number you want its variable to be :)
  6. Heya, sorry! I had a look at the code you provided. It's an old code, I'm using a plugin. I can link you the one I'm using?


    It's Vlue's GameTime code, which is here.


    I appreciate your help!


    I have been looking for 'variable' and whatnot but I'm not seeing it.
  7. Hatake-hime said:
    Heya, sorry! I had a look at the code you provided. It's an old code, I'm using a plugin. I can link you the one I'm using?


    It's Vlue's GameTime code, which is here.


    I appreciate your help!


    I have been looking for 'variable' and whatnot but I'm not seeing it.

    That is way more complex for me, not up to date on my javascript lessons for that :p
    You should try sending an email to the creator of the plugin, im sure he can help you out in how to retrieve the hour variables.
  8. Thanks so much for the help! I'm really confused haha, but I messaged the forum where I got it from and someone else saw it and has answered, though I'm still a bit confused at it.


    I hope they can help me, and I appreciate how you have bumped the thread again haha.


    Thanks!


    Still looking for answers if anyone can help! *Such a newbie*