Stéphane Magnenat wrote:
I'm not sure this will work without tweaking the gradients. Imagine you want to build an expansion in an area with no wheat. You build a teleporter at near wheat and in this expansion. You want workers to use the teleporter. If the wheat gradient does not take teleporter into account there is no way pathfinding can use it, as pathfinding, excepting for local glob avoidances, use gradients.

pathfinding has to be tweaked. globs will not only ask for wheat gradient but 
also for teleporter's wheat level and gradient.
to ease teleporter use i would do pathfinding like:
if(wheat_gradient > 240)
        use old algo
else
        if(teleporter_gradient && teleporters_wheat_level
                walk the teleporters gradient

Leo


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to