5 min before I can get more eggs.

Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
So, I have some chickens that lay eggs, but I want a 5 minute period before I can collect eggs from them again.  Is there a way to do this with out having the timer pop up?  I'm also having a problem with the timer resetting if I collect eggs form a second chicken.  I'm very new to this but learning quickly.  Any helps appreciated.
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
Thank You!  Just need to figure out how the plugins work now! ;)
 

Kelphy

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
87
Reaction score
6
First Language
English
Primarily Uses
RMMZ
You could just assign a timer as a parallel process in a common event. Set time to every 60 seconds increase variable[Timer] + 1, IF variable = 5 then [switch: Can Obtain Eggs]=ON Once the player grabs [Can Obtain Eggs] = OFF Change Variable[Timer] set 0

Idunno if that made sense, I'm bad at explaining.
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
I'm not sure what to do with this plugin.  I put it in the plugin folder in my game files, but when I enter a code for the plugin, the event dosn't show up in the game test.

Not sure if I have the plugin in the right file, or if I'm coding the plugin wrong.  I tried a couple different things. Got the same results, no event in the game test. :(
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
You could just assign a timer as a parallel process in a common event. Set time to every 60 seconds increase variable[Timer] + 1, IF variable = 5 then [switch: Can Obtain Eggs]=ON Once the player grabs [Can Obtain Eggs] = OFF Change Variable[Timer] set 0

Idunno if that made sense, I'm bad at explaining.
Not really sure how to set this up.  Only been doing this for about a week now.  It's all really confusing yet, but fun at the same time. 
 

Ghost of Christmas Kloe

The Icecream Princess
Veteran
Joined
Nov 15, 2015
Messages
1,548
Reaction score
957
First Language
English
Primarily Uses
RMMZ
I'm not sure what to do with this plugin.  I put it in the plugin folder in my game files, but when I enter a code for the plugin, the event dosn't show up in the game test.

Not sure if I have the plugin in the right file, or if I'm coding the plugin wrong.  I tried a couple different things. Got the same results, no event in the game test. :(
You didnt set it up did you...  :headshake:

Ok, I will send you here just so I dont have to explain everything... 

The second half is about what you need to do, the first is generally creating a game and stuff.

 
Last edited by a moderator:
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
You didnt set it up did you...  :headshake:

Ok, I will send you here just so I dont have to explain everything... 

The second half is about what you need to do, the first is generally creating a game and stuff.

Your right
Your right, no I didn't.  Thanks for the link,  was looking for somthing like this.
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
Got the plugin and have it loaded into the game, but i'm having trouble undrstanding the commands.  I tried to use one of the examples, but it dosen't seem to be working.  I do have the event in the play test now though.  I tried to add a timer ( addTimer 9.9.D 60 \setss([9, 9, 'D'], true) ), but I'm not sure what it really does.   Is it holdin the D switch on till the timer runs out or dose it turn the switch on after the time runs out?  Is it typed out properly?  I tried a few diffrent configurations, but I can't tell if the timer is working or not. 
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
That plugin command tells it to turn on self switch D of event 9 on map 9 after 60 seconds. It LOOKS correct, so can you confirm that it IS map 9, and event 9? You could also use <thismap> and <thisevent> if this is something you want to copy & paste to other events (then you won't have to go in and change each one).


If self switch D is already on, it won't make a difference, so make sure you're not playing from a saved game where that self switch was already on. Also make sure there isn't anything else that turns self switch D on in that event.


Or maybe, if you take the egg and turn self switch D on, what you really want is to make the timer turn it OFF after 60 seconds, instead of on? In that case, you'd set it to false rather than true.


If it's still not working, could you open up the event in the editor, move it so the status bar at the bottom of the MV window is visible (so I can see what's in there as well), make sure the plugin command is visible, and take a screenshot of the whole desktop?
 
Last edited by a moderator:
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
I did also notice that there are no parameters in the plugin is this correct?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
that's correct.
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
Success!!!!  I changed the first switch to C. I made a new blank event page and had the timer run on that page.  I left the second switch on D and made the D event page turn off all 3 switches. ( B, C and D). I did also use <thismap> & <thisevent> command, to duplicate the event.

One the first event page It asks (choices) Look for eggs or Leave. If you look for eggs, it will roll a variable and transfer to the appropriate event page B (event pages 2, 3, 4, & 5) witch will give and tell; 0,1,2 or 3 eggs depending on the variable rolled.  Where as the timer will start on the switch C event page (event page 6). When the timer runs out it will turn on switch D (event page 7), that is set up to turn off all self switches (B, C & D).  The command I used for the Timer plugin looks like this;  addTimer <thismap>.<thisevent>.C 300 \setss([<thismap>, <thisevent>, 'D'], true).

Thank you to all that helped me along with this.  I'm Very new to this and appreciate all the support given.  Thanks for the plugin Shaz.  Being as new to this as I am, It's rather difficult for me to find the appropriate places and plugins.  Thank you Kloe for the "Installing plugins" video.   I've gone through most of the tutorial vids on the RPG website.  If you peeps have any links to helpful places other then this, it woud be most appreciated.

Thanks again all.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
That sounds a bit too complex. I bet we can make it much shorter than 7 pages :)

Like, this will use just one event page, and you can "look for eggs" at any time, but they'll only be there if you haven't collected eggs within the last 5 minutes:

Code:
Show Choices: Look for Eggs; LeaveWhen [Look for Eggs]  Conditional Branch: Self Switch A is ON    Show Text: You search, but there are no eggs  Else    Control Variables: [001: Eggs Found] = Random(0..3)    Conditional Branch: Variable [001: Eggs Found] == 0      Show Text: You search, but there are no eggs    Else      Show Text: You search and find \v[1] eggs!      Change Items: Eggs + \v[1]    Branch End    Control Self Switches: A = ON    Plugin Command: addTimer <thismap>.<thisevent>.A 300 \setss([<thismap>, <thisevent>, 'A'], false)  Branch EndWhen [Leave]Branch End
This assumes that the sprite on the event is not going to change. If it is, just add a second page conditioned by self switch A with the correct sprite to show after they've searched, but leave everything else the same.
 
Last edited by a moderator:
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
With the random variable are you going to have the same percentage of gettig 3 eggs as you do to get no eggs?  You did manage to add an extra feature too.  I havet been able to figure out how to add a reponse to the chicken while it was in it's waiting period. 

I have been looking around for scripts like this, but when I find them I have a hard time figuring out how they are working based on the description givin by the writer.  This example exsplains alot about the lay out of the program knowing the platform of the subject.  Thanks Again!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
Yes, if the random number generator works correctly, you should have the same chance of getting 0, 1, 2 or 3 eggs.


Normally you'd use a self switch to make a different page on the event active. But my example above just uses it to set a 'flag' for the event that can then be checked. That's just another way of using self switches.
 
Last edited by a moderator:

Solis

Veteran
Veteran
Joined
Oct 24, 2015
Messages
376
Reaction score
84
First Language
English
That plugin command tells it to turn on self switch D of event 9 on map 9 after 60 seconds. It LOOKS correct, so can you confirm that it IS map 9, and event 9? You could also use <thismap> and <thisevent> if this is something you want to copy & paste to other events (then you won't have to go in and change each one).

If self switch D is already on, it won't make a difference, so make sure you're not playing from a saved game where that self switch was already on. Also make sure there isn't anything else that turns self switch D on in that event.

Or maybe, if you take the egg and turn self switch D on, what you really want is to make the timer turn it OFF after 60 seconds, instead of on? In that case, you'd set it to false rather than true.

If it's still not working, could you open up the event in the editor, move it so the status bar at the bottom of the MV window is visible (so I can see what's in there as well), make sure the plugin command is visible, and take a screenshot of the whole desktop?
Does your plugin timer work even off the map? Or would he have to be present on Map 9 for the egg to respwan after 60 seconds? 
 
Last edited by a moderator:
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
Allright so this is what I ended up with. 

    (note V=<  Variable is equil to or less then

     V=>  Variable is equil to or greater then)

Show Choices : Check for eggs, Leave

     : When Check for eggs

          If : Self Swich A is ON   

              Text : Can't look for eggs yet.

          : Else

                Control Variables = Random 0..100

                If : V=< 44

                     Text : You got no eggs.

                : Else

                     If : V=< 94

                          Text : You found one egg.

                          Change Item Eggs +1

                     : Else

                           If : V=< 98

                                Text : You found 2 eggs

                                Change Item Eggs +2

                           Else :

                                If : V=> 99

                                     Text : You found 3 eggs

                                     Change Item eggs +3

                           End

               Control Self Switch : A = ON

               Plugin Command : addTimer <thismap>.<thisevent>.A 300 \setss([<thismap>, <thisevent>, 'A'], false)

     : When Leave

     : End

This is pretty much what I had spread out over 7 event pages minus a bunch of self switch controls.

Tell me what you all think.

Thanks again for the help Shaz!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
I can't see your Branch End statements - a screenshot of the event window would have been better.


You're only giving them a 2/100 chance of getting 2 eggs, and a 1/100 chance of getting 3?


The logic seems alright, if the Branch End statements occur where I think they might. As long as your self switch is being turned on, and the timer set, for any of the conditions under the original Else statement. You could even put them right up there with the Control Variables statement.


@Solis, yes, it works even when you're not on the map. If you have more questions, please ask in the thread for the plugin, rather than someone else's help thread.
 
Joined
Dec 3, 2015
Messages
25
Reaction score
1
First Language
English
There are quite a few "Ends" In the thread, I didn't want to type it all up and the thread was loger then I could get in one screen shot. If you talking about after the plugin command there is one there. I must of over looked it.

I tried it out quite a few times, it seems to be working properly.  I have gotten all outcomes and the increase spread is where I wanted.  Don't need to be collecting them to quick.  Just a nice little supprize if your able to get 2 or more.

Can never be too appreciative about the help, Thanks again!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top