Help with Chopping Trees?

So, I'm making a game where at one point the player can chop down trees. I want the player to be able to chop down the tree by clicking on the trunk 2 or 3 times. Although, I'm not sure how to make this happen in an event. So basically, I'm wanting to know how you'd be able to have part of an event be triggered once something is clicked multiple times. Thank you to anyone who can help me with this!
Probably the easiest way would be to use self switches.  Put the tree sprite on 3 pages of the event and a stump on page 4.  Set them all to Action Button trigger.  


Page 1 has no conditions, and the commands will play a chopping SE and turn on self switch A.


Page 2 is conditioned by self switch A, plays a chopping SE and turns on self switch B.


Page 3 is conditioned by self switch B, plays a chopping SE, gives the player the item (chopped tree, log, etc), and turns on self switch C.


Page 4 is conditioned by self switch C.


If you want to visibly show the tree being affected (chops in the trunk, getting larger with each hit), you could put a slightly altered sprite on pages 2 and 3 to show the tree has been chopped once, then twice.


Then you can copy/paste the event wherever you want it to go.


The nice thing about using self switches is you can start chopping one tree, go chop another, maybe go to a different map, then come back, and the first tree will remember you've already started chopping it, so you only have one or two more chops to go.


I don't think you could do it using regular switches or variables, and the method above would work, so looking for a plugin would be overkill.


Also, if it's a large tree (more than a single tile), don't choose the image from the tileset.  That would mean you'd need to use at least two events per tree, and sync them so chopping the bottom of the tree three times would make the top of the tree disappear.  Instead, copy the tree image from the tileset, and use it to create a character sheet.  That lets you use just one event for the whole tree.  In that case, make sure you check the 'direction fix' box on each event page, so the event doesn't change direction when you interact with it from different angles (this means you only need ONE tree in your character sheet, and not 12 of them).
Yea, that worked. Thank you! 🙂
Luckily you only wanted to chop it 3 times.  If you wanted 5 times, there wouldn't be enough self switches 😉

Original thread: https://forums.rpgmakerweb.com/threads/help-with-chopping-trees.73272/