Add a variable to another variable?

One more guys, sorry for asking so many questions.

Is there a way to add the value of one variable to another?

For example:
I have a variable called Villager_number which gets a +1 every time you perform a specific function
I also have a variable called Food that gets a +1 every time you perform a different function

The idea is for the villagers to be collecting food on their own, therefore I want the number of villagers to add an amount to the Food variable every few seconds.

I have the timer working with doing +1 to variable Food every 5 seconds, but I want that number to raise equal to the value of Villager_number: (2 villagers = 2 food every 5 seconds, etc.)

Any thoughts?

Hi! Dunno if it helps but maybe you could try adding a function that multiplies the number of Food collected by the number of how many Villagers you got? At least that’s the way I see it. :slight_smile:

Yes, just do:

Do + 1*Variable(Villager_number) to the variable food

:wink:

Be careful, the “+” in the previous answer in not in the value, but it’s the “modification sign” that you have to select when editing the function.

Thanks everyone. Worked like a charm!