joman195 9 Report post Posted March 18, 2011 First off, this class is not for teaching you the basics, there are other classes on here that do that. This is a class for those who want to learn how to string events together. Second off, this is an open class meaning anyone can participate in the assignments, first there will be three parts then an assignment. Now that the giant wall of text is done let's get down to the real stuff. First off I am going to show you how to make a banking system that gives 25% interest every 10 sec, now you can easily change this. What you will need: 3 Variables 2 common events 1 switch Alright first make your two common events and label them like so: Then make three Variables and name them: On Hand, In Bank, and Temp: Next inside bank make a loop, inside it make a choice: Deposit, Withdraw, Check Balance, Cancel. Inside Deposit make a number input processing command and have it save to the variable temp. Then set the variable on hand to your current gold and make a conditional branch to check if the variable in temp is less than or equal to your gold keep he box checked. First, under else make a text box saying 'Not enough gold!' or something to that effect. Above the word else make a change gold and hit decrease then select variable and temp. Create a control variables and choose in bank and add then hit variable and temp, for deposit do the same thing except add gold and subtract the variable. Then for check balance make a text event with \V[the number of the in bank variable]. And for cancel use the break loop command. When it's completely finished it looks like this. Now, for the interest. Go to the other common event and make it parallel process with the switch being the one you made earlier. Then make a timer for 10 sec. after that make a conditional branch for the timer being 0 sec or less and uncheck the box. Then use the change variable and set the temp variable equal to the in bank variable, then divide the temp variable by 4 and add it to the in bank variable. Start a new timer and you're set. Now make an autorun event on a map to turn on the interest switch and an action button event and call the bank common event. It should turn out like the one attached. Bank.zip Share this post Link to post Share on other sites
Marked 197 Report post Posted March 21, 2011 Straight into it then :) Pretty advanced for the first lesson. Despite the couple of years of played around in RMXP, I don't think I ever actually used common events. Looking forward to the next one :) Share this post Link to post Share on other sites
Polraudio 122 Report post Posted March 21, 2011 Nice lesson. You can also use the wait command and variables instead of a timer. Share this post Link to post Share on other sites