|
From: | Leo Wandersleb |
Subject: | Re: [glob2-devel] teleporters |
Date: | Tue, 06 Feb 2007 22:09:26 +0100 |
User-agent: | Icedove 1.5.0.9 (X11/20061220) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |