daviiadams
Prince
I'm trying to retrieve Specialist yield output for each player and wondering if I've got the code right, or at least going in the right direction.
This is what I have:
So far, this results in a zero for all but Production, which returns 1, regardless of whether specialists are being used, or not.
Should I have if/elseif statements within the loop for each specialist type, or should it be putting each one through automatically each time it goes through anyway?
This is what I have:
Code:
for pSpecialist in GameInfo.Specialists() do
iSpecialistID = pSpecialist.ID;
iSpecialistType = pSpecialist.Type;
iSpecialistScienceYield = pOtherPlayer:SpecialistYield(iSpecialistType, YieldTypes.YIELD_SCIENCE);
iSpecialistGoldYield = pOtherPlayer:SpecialistYield(iSpecialistType, YieldTypes.YIELD_GOLD);
iSpecialistCultureYield = pOtherPlayer:SpecialistYield(iSpecialistType, YieldTypes.YIELD_CULTURE);
iSpecialistFoodYield = pOtherPlayer:SpecialistYield(iSpecialistType, YieldTypes.YIELD_FOOD);
iSpecialistProductionYield = pOtherPlayer:SpecialistYield(iSpecialistType, YieldTypes.YIELD_PRODUCTION);
end
So far, this results in a zero for all but Production, which returns 1, regardless of whether specialists are being used, or not.
Should I have if/elseif statements within the loop for each specialist type, or should it be putting each one through automatically each time it goes through anyway?