I'm trying to make a system which should work something like this: once every 60 seconds you get a unit that once it has traveled to a specific point will add 4 food to you food cap(if food cap is the right thing to use) Then when you buy a unit you lose one food from the food cap, so if you would get a unit that gives you 4 food, then you buy a unit you just have 3 food left. And if you buy another 3 units your food cap is 0 and then you can't buy more units, these parts are easy. But i need to solve the problem that you can have 1 in food cap, but you can still start producing maybe 4 units in a house. Once the first unit is done you can't put more units into the production queue, but the units still in production will be produced and this results in your food being under 0, so if you had 0/1 when you started production, you now got a odd number like 0/-3, and this fucks things up for me. You shouldn't be able to produce units when food is 0/0.
So if any1 could give me a few hints how to do this, if i need variables or anything.
So if any1 could give me a few hints how to do this, if i need variables or anything.