Tree trouble

I'm making a game in which the player needs to buy an axe and use it to cut down trees for logs. I already made the axe item and logs item and I was wondering if there was a way to make so that I can cut down trees without having to go to the menu and select it under the key items tab. Can you make it so that you can just walk up to a tree and press a button and chop the tree down. I think I could do it somehow but I would have to have an event on every tree on the map. Is there some way to do it without having to event every tree? The axe and the logs are key items.
Yes. Just have a Conditional Branch to check if the axe is in inventory. If it is, chop the tree down. If it isn't, either display a message, or just do nothing.


And yes, if you wanted them to be able to chop every tree, you would need to make every tree an event (don't draw them on the map, but make a character sheet to hold them).


To do it without events, you could probably use regions and check if the player is pressing the space bar and the tile in front of them is painted with that region id, then chop the tree down.


But if you want the map to change afterwards, it's just as easy to do it with events, otherwise you're going to have to add scripts that will let you call (and save) the status of the map at every location where there's a tree.
You can also tie a common event to a button with Yanfly's Button Common Events in addition to what Shaz has stated.

~ Dinhbat
Thanks, this helps a lot. Is there a way to make a short little animation of the player swinging an axe too? I saw like in an ad for another game made with RPG maker vx ace that someone did something really similar when someone forged stuff in an armory, so is it actually possible?
You will need custom sprite sheet that is chopping. Within the event (if you use the button action script you just do it within the event that you are making the button's common event) you would have the sprite show a walking animation of the chop, add the battle chop animation effect could be a nice touch too.

But again you will need someone to do the sprite sheet of the chopping action for you. and if you have multiple characters that can be in the world map, they would each need a sprite for this.

~ Dinhbat 
Thanks.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/tree-trouble.25789/