Planting Trees

● ARCHIVED · READ-ONLY
Started by Caedmon 14 posts View original ↗
  1. Right now I am using vaiables to accomplish planting trees how do I make it so that only one tree grows at a time when a varibale is reached? I noticed that right now if a variable is reached all of a sudden trees start popping up everywhere. I was using Celianna's garden events modified for this. There are only 3 self switches correct?
  2. My what now?

    You need a different variable for each event/tree, otherwise they'll all use the same variable, and thus they'll all appear to grow.
  3. Hmm so what's a better option because if I have 10 variables for each tree that is going to eat up a lot of variables fast. Any ideas?
  4. Maybe VX Ace has a self variable script out there, I suggest looking for one, otherwise you'll be quite busy.
  5. Celianna said:
    Maybe VX Ace has a self variable script out there, I suggest looking for one, otherwise you'll be quite busy.
    If you have to go this route, it's still well worth the time and effort. I'm working with some events that require a great deal of tedium to make sure they all fire off differently, so as to give the effect of randomness, and the end results are shaping up nicely. Good luck!

    GB
  6. So Genii you are using a different set of variables for every one? I'm thinking this could end up being hundreds of variables. Is there an issue with having too many variables and the game running slow?

    Edit: Any one use PK8's self data script with good results?

    http://forums.rpgmakerweb.com/index.php?showtopic=1567
  7. Caedmonball19 said:
    So Genii you are using a different set of variables for every one? I'm thinking this could end up being hundreds of variables. Is there an issue with having too many variables and the game running slow?
    I hope to do a 'stress test' this afternoon. I've actually been thinking it over, and my own personal configuration - being random - may not require variables at all. It will, however, require a couple of random timing choices... Essentially, I'm going to test a room containing twenty or so monitors, whose screens 'change' at a random interval. I'm planning on first, choosing a random screen type (I've already made about 50 different monitor screens this morning) and then delaying the screen change for a random number. If it works as intended, the random screen delay should be different for each monitor screen, and then each one should look different and change at different times.

    We'll see, but I'll report back!
  8. No, the game won't lag if you use a lot of variables. Myself I've used over 900 almost, it runs fine.

    It's when you've got several events on the map, or a bunch of parallel processes running, that the game loses framerate.

    I haven't tried out PK8's script, but it seems that's the one you're looking for (it also gives you more self switches, which is a dream) :)
  9. Celianna said:
    It's when you've got several events on the map, or a bunch of parallel processes running, that the game loses framerate.
    Well, I DO have some good news for you, in this regard. I've configured a single map with (so far) 50 monitors, all running parallel processes, and running randomized variables so that every screen shows an image after a random variable's worth of wait, and even selecting a random pattern to run on the screen, without any visible frame degradation. (It's a spaceship. It has to have a bunch of monitors doing something, at least!)

    Basically, I run a common event for each monitor that rolls up a variable between 1 and 6. For each number, I've added a 10 frame delay (so, from 10 to 60 frames, or 1/10 of a second to 1 second) before the monitor screen changes. I have three different animated monitor screens (so far) in my test (one green, one amber, and one white) that run through 7 walking animations. If the above variable is 1 or 2, I select the first monitor animation. 3 or 4, the second, etc. It runs through it's display sequence, and then, it repeats all over again. I've made a call to the common event, and then copied it (so far) 50 times. When it's run, voila. Nice and quick.

    Maybe there's some way you can use this method for the trees, Caedmonball19?
  10. I think you could do this a bit easier by using common events, maybe something like...If you water the plant, it turns on a switch that activates that trees common event and adds 1 to the variable Tree 1. In the common event you should have conditional branches. Something a little like this.

    Conditional Branch, if variable Tree 1 = 1

    Wait so many frames

    Turn switch Feed Me! on

    Turn switch Tree 1 watered off

    Else

    Conditional Branch, if variable Tree 1 = 2

    etc etc

    Keep going however many times you want until the plant's fully grown. The event itself will have different pages with the same commands, something like this.

    Tree stage 1

    Conditions - none

    Show Text - Water the tree?

    Show Choices Yes, No

    When Yes - turn switch Tree 1 fed on, add 1 to variable Tree 1

    Tree stage 2

    Conditions - Variable tree 1 = 1

    Show Text - Water the tree?

    Show Choices Yes, No

    When Yes - turn switch Tree 1 fed on, add 1 to variable Tree 1

    Etc etc

    I'm not sure if this is the kind of tree growing you want though, I could tinker around a bit and sort it out properly, this is all off the top of my head, hope it helps even a little bit :3
  11. Hey RyanA, that's very similar to the idea I put forth at the same time - great minds think alike! (Oh, and for those wondering - yeah, I managed to break the framerate. There's something about 100 parallel processes running that seems to impact the engine just a little bit...)

    :p

    GB
  12. Genii Benedict said:
    Basically, I run a common event for each monitor that rolls up a variable between 1 and 6. For each number, I've added a 10 frame delay (so, from 10 to 60 frames, or 1/10 of a second to 1 second) before the monitor screen changes.
    I dont wanna burst your bubble but I think you make a calculation mistake there.

    if 60 F (framrate) = 1.0 second

    10 F = 1.66/10

    (I mean this in good intention for when you make a script you and others get the timing right, or am I wrong?

    Kind Regards,

    //Robin
  13. Terloch said:
    I dont wanna burst your bubble but I think you make a calculation mistake there.

    if 60 F (framrate) = 1.0 second

    10 F = 1.66/10

    (I mean this in good intention for when you make a script you and others get the timing right, or am I wrong?

    Kind Regards,

    //Robin
    When you're right, you're right. I never was much good at math. By my calculation, 10 frames are one sixth of a second, and therefore, 6 frames should be one tenth of a second. (I think.)

    GB
  14. Genii thanks for the continued updates. Glad you got it working.

    RyanA I will try that out thanks for throwing that together for me. If you do have time to formalize I would love to see it but that at least is a good start.