You are right that we need an additionalCommander McLane wrote:However, they will leave their escorts behind in the process.Eric Walch wrote:the player ship now creates a wormhole and I just tested it: normal pirates will just follow you when jumping to a nearby system.
Two problems:
(1) The PLAYER WITCHSPACE message in pirateAI nowhere triggers awormholeEscorts
. I think it should beor something like that.Code: Select all
"PLAYER WITCHSPACE" = ( enterTargetWormhole, wormholeEscorts );
(2) That wouldn't even be enough.wormholeEscorts
sends an ENTER WORMHOLE to the escorts. They do receive that while in normal escort mode (stage FLYING_ESCORT). However, during a fight the escorts have interceptAI, and there is no ENTER WORMHOLE message in that AI. It would at least be needed in the AI's ATTACK_SHIP state, and should probably also contain anexitAI
, so that in the new system the escort is correctly re-attached to its mother.
wormholeEscorts
at your indicated location (2x)the interceptAI needs more modifications to let escorts follow. The following interceptAI was just tested as working:
Code: Select all
{
GLOBAL =
{
ENTER = (switchLightsOn, "setStateTo: ATTACK_SHIP");
};
"ATTACK_SHIP" =
{
ENTER = (performAttack);
"ENERGY_LOW" = ("setStateTo: FLEE");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
"ESCORT_ATTACKED" = (setTargetToPrimaryAggressor, groupAttackTarget);
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
"TARGET_DESTROYED" = (performIdle, switchLightsOff, exitAI);
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);
"PLAYER WITCHSPACE" = ("setStateTo: PLAYER_WITCHSPACE");
"ENTER WORMHOLE" = (performIdle, switchLightsOff, "exitAIWithMessage: ENTER WORMHOLE");
};
FLEE =
{
ENTER = (deployEscorts, "setDesiredRangeTo: 25600", performFlee);
"ENERGY_FULL" = ("setStateTo: ATTACK_SHIP");
"TARGET_LOST" = (performIdle, switchLightsOff, exitAI);
"TARGET_DESTROYED" = (performIdle, switchLightsOff, exitAI);
"REACHED_SAFETY" = (performIdle, switchLightsOff, exitAI);
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
"PLAYER WITCHSPACE" = ("setStateTo: PLAYER_WITCHSPACE");
"ENTER WORMHOLE" = (performIdle, switchLightsOff, "exitAIWithMessage: ENTER WORMHOLE");
};
"PLAYER_WITCHSPACE" =
{
"ENTER WORMHOLE" = (performIdle, switchLightsOff, exitAI, enterTargetWormhole);
};
}
It can happen that the escorts are closer to the wormhole and thus exit sooner. Escorts are very impatient and when mom does not arrove soon enough they are on the look for a new master.