How to make this event run? (explained inside)

So what I am trying to have happen is that someone gives the play a question to gather 10 pieces of wood and once they gather all 10 pieces then they would get a reward. I am trying to figure out how to get it to where the reward will only be given once the player actually has 10 pieces of wood in their inventory. How would I do this?
The way I do is I set a variable to 1 when the quest is given, then for each piece of wood you grab, increase the variable by 1. Then, once the variable is 11 (1 for getting the quest + 10 for the wood) you get the reward. You can use a condition branch to see if the variable is high enough for you to get the reward or not.


Then, once I get the reward, I add one more to the variable, to flag it as done. This means I can check to see if it is 12 or higher to see if the quest has been completed (also via a conditional branch).
Make the pieces of wood real items (without a use), then when the player returns to the quest giver have that event use control variables to check how many wood items are in inventory.


I suggest you follow the link to the starting point in my signature and work through the tutorials there, that will bring you up to using events as fast as possible.
You could add a conditional branch for the reward inside the event that will give the player the reward, and add a variable into it: For example name it pieces of wood.


Depending on how you set up the ability for the player to get the pieces you will have to work around it differently, but if the player needs to interact with events in order to get wood, just put the same variable inside the events of the log and add +1 to that variable. So each time the player interects with a wood event they will recieve 1 piece of wood, and the variable will increas by 1. When you have interacted with 10 wood events and the player has 10 wood, the variable will also be set to 10.


So when you get back to the questgiver and use the Conditional branch if x (the pieces of wood variable) is 10 or greater, the player will recieve the reward. If its not he will get some other text message or something similar. 


Also make sure to add a switch or a new event page for when the task is completed. Otherwise you will be able to get multiple rewards from the questgiver.


If you need more information on how to set this up, dont be afraid to ask.
This can now be closed as it was answered.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-this-event-run-explained-inside.61213/