Too vague, what sort of interaction do you mean.
a worker took a pig into a butcher house, then the house would play animations like when the worker were to get the tool needed to chop the pigs head of.
ATM and AFAIK one unit cannot control another unit, i.e. your worker could not "take a pig" nowhere (but I might be wrong). On the other hand, if the pig is not another unit but rather a resource (like gold, stone, wood are) then yes, you could get a given "amount" of pig to any building that might use it.
I think you can probably use emanations to make your worker able to execute command say "chop pig to pieces" only when it is in/immediatelly close to the said building. On the other hand, you can have the building run a command such as "chop pig to pieces" and specify the corresponding animation in the building's XML.
(the above regards to what is already implemented on the engine)I want workers to be affected by what kind of units that are close by, so that when they are under heavy protection they will harvest more than wehn they are under no protection at all, like the whole animation and speed rate increases when close to other units that carry weapons
Also, i would love to have the opportunity to have individual workers for each resource. Like woodcutter, gold miner, grain farmer etc. and tht each of these could affect eachother aswell.
Possible now, use emanations.
Specifically regarding:
i would love to have the opportunity to have individual workers for each resource. Like woodcutter, gold miner, grain farmer
Nothing easier! Specify it on the XML. Look at a Tech Worker's XML: it specifies that worker can gather all three standard gatherable resources (gold, stone and wood), remove two of them (say stone and wood) and that unit will be able to gather only gold.
Note:GAE 0.2.13a fixes a bug where the CPU players would not produce units that could only gather but not build/repair.
But 0.2.13a is still only in RC (release candidate) state... Both the original Glest and MegaGlest (not 100% sure about the later) still have that bug. As soon as GAE 0.2.13a final is out, all I said above is good.
For units interefecting each other... use emanations as silnarm suggested.
How can i make it so that only one building can have resources and that the units goes in one door of the building and comes out the other.
You can't.[/quote]More precisely:
You
can't preset the path a unit follows into and out of a building - the unit itself will determine the best path to take for whatever movement it needs to do everytime.
You
can have only one building store resources (the gathering units will resources only to buildings that can store them). In the building's XML, nested under <parameters>, use the <resources-stored> list. E.g.:
<resources-stored>
<resource name= "gold" amount="2000"/>
<resource name= "wood" amount="1200"/>
<resource name= "stone" amount="1500"/>
<resource name= "food" amount="150"/>
</resources-stored>
So the that all the other buildings can store nothing, put this in their XML's instead:
<resources-stored />