Gorton wrote:codepants wrote:Again, yes, the ideal solution would be that they "know what to do," but any solution where they "automatically" go refuel, there's going to be issues of when exactly do they do that. You don't want half your squad staying behind at a critical moment.
How about "When they're out of fuel" ?
I'd rather have them refuel at around 30%, honestly. Otherwise you could order them to battle with 3% fuel, then run out either before they get there or during the fight. Theoretically at least a fraction of your force will run out around the same time.
But not at a "hard" 40%, because if they enter with 43%, they could leave to refuel before or during the fight (same problem with any "hard" % except at least above 0 they don't take forever to make it back to the staging facility).
And still... planes with an empty tank can make the difference in a fight, so you might want them to go until you order them to.
In any case, I think we're arguing nuances here that don't really matter in the end. I agree with you in principle: units that manage themselves would be easier to manage.
Lichking suggested something like:
if(fuel < 0.3 && idle && idletime > 5000 && autorefuel){gorefuel();}
Where:
- fuel is the percentage of fuel the plane has
- idle is whether or not the unit has any orders queued (move, attack, etc)
- idletime is set to 0 every time the unit completes its last order and counts up in ms
- autorefuel is a boolean set by the player
@braing, I think you're agreeing with me...? Clarify if not.