Announcement

Collapse
No announcement yet.

I've Done It! Events that reset over time.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I've Done It! Events that reset over time.

    It took a while, but I did it.
    In my game I have plants that grow back after two in game days. Such as flowers and the like that can be given away to boost an npc's disposition. Over all it took four events, 2 to calculate day passage, 1 to reset the "plant event" and then the actual collecting plants event. Ran into all kinds of auto loop troubles at first but it works.

    Anybody else done this a better way? If so I would like to know how now that I figured it out myself.

    #2
    Re: I've Done It! Events that reset over time.

    Its actually quite simple to do, but theres multiple ways of doing it...Im not going to get into the details of it but in the Dark Tower demo I made it allows for the weather to change on a pseudo-random basis depending on which of the 30 days in a month youre on.

    It also calculates seasons and changes the seasons every 120 days(shortened the year quite a bit), so it can do a variety of things outside depending on what time of year it is.
    Last edited by JPS; 05-23-2008, 05:28 PM.

    Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

    Comment


      #3
      Re: I've Done It! Events that reset over time.

      care to share any other time saving idea's that you have used before? Besides the non basic stuff?

      Comment


        #4
        Re: I've Done It! Events that reset over time.

        The first part of your thread's title reminds me of...

        *** SPOILERS ***
        Memento
        *** END SPOILERS ***


        Also, I'm going to have to look into doing something similar myself if I ever want to release my Series 3 demo. My only question is, it seems as if it would include a LOT (depending on how many plants you neded to do this with, if they all needed to "regrow" at the same time, and if tey are all in one area) of display on/display off events, which would include more of the flashing black screens than I'm comfortable using in a game. S3 already, in its demo state, has TOO many already whenever you plant crops.


        Meh...I'm having a feeling after posting in this thead that I'm going to have to go back and partially dismantle my system in order to more realistically simulate planting and harvesting of crops. I'm pretty sure I'll be able to do it if I tried, given that when making S3, I had just passed the threshold of knowing all the basics and figuring out some ways to manipulate the code, but had not yet approached what I had accomplished in A Series Aside.

        Yeah, congrats for figuring out a workable system to do this. It's ALL about trial and error.

        Comment


          #5
          Re: I've Done It! Events that reset over time.

          I could be thinking of the wrong game, but isn't the one you're talking about the farm/sim? If it is you could make it so when you go to sleep(if that's apart of the game) make the black flashes from the display on represent different time segments. Like say each flash equals 2 hours, and you can give the player the option of how long to sleep. Then depending on the plant it will grow after so many hours of sleep. The display ons would blend with the "time segments." Well just an idea. It would be a good amount of coding, but it wouldn't be too hard.

          Comment


            #6
            Re: I've Done It! Events that reset over time.

            or you could simply put the grow commands outside of that area so there will be no flashing...such as in a field or as lausen suggested in a sleep event...if youre in a different area of th game there will be no refresh flashes
            Last edited by JPS; 05-24-2008, 02:21 AM.

            Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

            Comment


              #7
              Re: I've Done It! Events that reset over time.

              They ARE outside of the area right now. You go to sleep at the (custom) inn on a day after planting the crops, and when you wake up, there is command code to turn on the display for whatever you planted the day before. If you planted three plots of land, even though it's not in the same area, you still get three flashes.

              But, yeah. I'll need to work on this to get it into releasable shape.

              Comment


                #8
                Re: I've Done It! Events that reset over time.

                are you sure? Ive never had that problem, if youre in a different area, you dont have to use the "refresh" command because when you go outside it automatically refreshes everything.

                Here I come Pav, like the Kool-Aid man barging into a funeral! Oh yeah!

                Comment


                  #9
                  Re: I've Done It! Events that reset over time.

                  The way I did it was I have two events to track time, that auto loop between themselves. Adding a shared variable anytime it reaches moring or night. So in game terms, anytime that shared variable reaches the value of 4. It represents two "days" of in game time. Once the variable hits 5, the value resets at 0.

                  The third event, My reset timer if you will. Auto runs any time the shared variable resets to the value of 0. When this event runs It checks to see if any of my assigned plant variables are at 1. (I have a variable for assigned to each plant for the sake of keeping track of inventory. I should mention that in my game you can only have in your inventory 1 type of each plant at a time. No duplicates).
                  If any of the plant variables are at 1, it resets them back to 0. Then turns its diplay off.

                  I should also mention that when the time resets back to the value of 0, it turns my reset events display back on.

                  Sorry for the convoluted post. My explanations on the pavaliion will get better the more I post I hope. I'm just not used to the whole organizing things without code thing.
                  Last edited by flotsemjetsem; 05-25-2008, 12:23 PM. Reason: On the second paragraph it should say, Auto runs any time the shared variable reaches 5. My bad.

                  Comment


                    #10
                    Re: I've Done It! Events that reset over time.

                    I understood it. Don't worry I couldn't explain something to save my life.

                    Comment


                      #11
                      Re: I've Done It! Events that reset over time.

                      I tried to do this before as well, only I discovered that it wouldn't work because it would only track time changes on that one map. However, if you're using more than one event... (I was using one event that changed modes).
                      Final Exams are not a good time to attempt to get back into a site. ^_^;

                      Comment


                        #12
                        Re: I've Done It! Events that reset over time.

                        Can I do this to make a boss appear after you defeat it again at a certain time of day or something? How can I do this specifically (the events that keep track of time).

                        Comment

                        Working...
                        X